Skip to content

Commit

Permalink
add pythonrc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Attsun1031 committed May 3, 2014
1 parent 8927911 commit b8a7043
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions python/.pythonrc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import rlcompleter
import readline
import atexit
import os

if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")

#readline.parse_and_bind('tab: complete')

histfile = os.path.join(os.environ["HOME"], ".pyhist")
try:
readline.read_history_file(histfile)
except IOError:
pass

atexit.register(readline.write_history_file, histfile)

del os, histfile

0 comments on commit b8a7043

Please sign in to comment.