-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup.py
More file actions
29 lines (25 loc) · 783 Bytes
/
startup.py
File metadata and controls
29 lines (25 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import sys
if sys.version_info.major==2:
try:
import readline
except ImportError:
#print "Module readline not available."
pass
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
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
#import sys
#sys.path.append('/usr/local/lib/python2.7/site-packages/')