-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pythonrc
31 lines (26 loc) · 975 Bytes
/
.pythonrc
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
29
30
31
import readline
import rlcompleter
import os, atexit
import sys
if 'libedit' in readline.__doc__:
# Some versions of Mac os comes with a libedit-readline compatibility shim.
# Instead of normal readline. These need a different binding string.
readline.parse_and_bind ("bind ^I rl_complete")
else:
readline.parse_and_bind ("tab: complete")
historyPath = os.path.expanduser("~/.pyhistory")
def save_history(historyPath=historyPath):
import readline
readline.write_history_file(historyPath)
if os.path.exists(historyPath):
readline.read_history_file(historyPath)
atexit.register(save_history)
#sys.path.insert(0, '/usr/local/google_appengine/lib/fancy_urllib')
extra_paths = [
os.path.expanduser('~/local/src/libkml-1.2.0/build/lib/python2.7/site-packages'),
]
for path in extra_paths:
if os.path.exists(path):
sys.path.insert(0, path)
del extra_paths, path
del os, atexit, readline, rlcompleter, save_history, historyPath, sys