- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_pythonstartup
More file actions
Latest commit
24 lines (18 loc) · 507 Bytes
/
Copy path_pythonstartup
File metadata and controls
24 lines (18 loc) · 507 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
#!/usr/bin/env python
# Disable print statement in Python 2.
from __future__ importprint_function
# From http://stackoverflow.com/a/4289945
importreadline
importrlcompleter
importatexit
importos
# tab completion
readline.parse_and_bind('tab: complete')
# history file
histfile=os.path.join(os.environ['HOME'], '.pythonhistory')
try:
readline.read_history_file(histfile)
exceptIOError:
pass
atexit.register(readline.write_history_file, histfile)
delos, histfile, readline, rlcompleter