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)
except IOError:
pass # No such file
+ # if 'libedit' in readline.__doc__:
+ # readline.parse_and_bind("bind ^I rl_complete")
+ # else:
+ # readline.parse_and_bind("tab: complete")
def savehist():
histsize = os.environ.get('HISTSIZE')
try:
builtins.raw_input
- except AttributeError: # PY3
+ except AttributeError: # PY3
builtin_input = builtins.input
builtins.input = myinput
else:
pager = Pager()
try:
pager.pprint(value)
- except:
+ except: # noqa
pager.stdout = ColoredFile(pager.stdout, '\033[31m') # red
print_exc(file=pager)
pager.close()
sys.excepthook = excepthook
- #try:
- # import cgitb
- #except ImportError:
- # pass
- #else:
- # # cgitb.enable() overrides sys.excepthook
- # cgitb.enable(format='text')
+ # try:
+ # import cgitb
+ # except ImportError:
+ # pass
+ # else:
+ # # cgitb.enable() overrides sys.excepthook
+ # cgitb.enable(format='text')
# From Thomas Heller:
# https://mail.python.org/pipermail/python-list/2001-April/099020.html