summaryrefslogtreecommitdiff
path: root/packages/python/python-2.5.1
diff options
context:
space:
mode:
authorMichael Lauer <mickey@vanille-media.de>2008-02-06 22:37:08 +0000
committerMichael Lauer <mickey@vanille-media.de>2008-02-06 22:37:08 +0000
commit182065fd7d66b9eb9480913c99f39428ef657c9a (patch)
treef1841ad3dc0b911784c7a6507342de3d2bd12d8e /packages/python/python-2.5.1
parent8f29644efce44f9059fb290b644047caf9146c1b (diff)
python 2.5.1 sitecustomize.py now saves the history in $HOME, not in /tmp
Diffstat (limited to 'packages/python/python-2.5.1')
-rw-r--r--packages/python/python-2.5.1/sitecustomize.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/python/python-2.5.1/sitecustomize.py b/packages/python/python-2.5.1/sitecustomize.py
index b5e78d3200..4c0ba3f0da 100644
--- a/packages/python/python-2.5.1/sitecustomize.py
+++ b/packages/python/python-2.5.1/sitecustomize.py
@@ -7,11 +7,11 @@
# * load command line history on startup
# * save command line history on exit
-HISTORY_FILENAME = "/tmp/python-history-file.txt"
+import os
def __exithandler():
try:
- readline.write_history_file( HISTORY_FILENAME )
+ readline.write_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
except IOError:
pass
@@ -22,7 +22,7 @@ def __registerExitHandler():
def __enableReadlineSupport():
readline.parse_and_bind("tab: complete")
try:
- readline.read_history_file( "/tmp/python-history-file.txt" )
+ readline.read_history_file( "%s/.python-history" % os.getenv( "HOME", "/tmp" ) )
except IOError:
pass