or os.path.expanduser('~/.inputrc')
readline.read_init_file(initfile)
+ #if 'libedit' in readline.__doc__:
+ # readline.parse_and_bind("bind ^I rl_complete")
+ #else:
+ # readline.parse_and_bind("tab: complete")
+
histfile = os.path.expanduser('~/.python_history')
try:
readline.read_history_file(histfile)
def myinput(prompt=None):
save_stdout = sys.stdout
sys.stdout = sys.__stdout__
- result = builtin_input(prompt)
+ try:
+ result = builtin_input(prompt)
+ except EOFError:
+ result = None
sys.stdout = save_stdout
return result