# this add completion to python interpreter
import readline
import rlcompleter
# see readline man page for this
readline.parse_and_bind("set show-all-if-ambiguous on")
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)
del os, histfile
# you can place a file .pythonrc.py in your home to overrides this one
# but then, this file will not be sourced