This is an old revision of the document!


Python

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.1147121271.txt.gz · Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready