Differences

This shows you the differences between two versions of the page.

Link to this comparison view

python [2006/06/09 00:00]
a
python [2009/05/25 00:35]
Line 1: Line 1:
-====== Python ====== 
- 
-see: **[[http://www.red-sweater.com/blog/140/learn-python|Good article about learning python]]**, [[http://nodebox.net/]] 
- 
-==== python interpreter (history + autocomplete) ==== 
- 
-**''.pyrc''** 
-  try:  
-          import readline 
-  except ImportError: 
-          print "Module readline not available." 
-  else: 
-          import rlcompleter 
-          readline.parse_and_bind("tab: complete") 
-  import os 
-  histfile = os.path.join(os.environ["HOME"], ".pyhist") 
-  try: 
-          readline.read_history_file(histfile) 
-  except IOError: 
-          pass 
-  import atexit 
-  atexit.register(readline.write_history_file, histfile) 
- 
- 
-**''.bashrc''** 
-  export PYTHONSTARTUP=~/.pyrc 
- 
- 
  
python.txt ยท Last modified: 2009/05/25 00:35 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready