python 2.5.1 sitecustomize.py now saves the history in $HOME, not in /tmp
authorMichael Lauer <mickey@vanille-media.de>
Wed, 6 Feb 2008 22:37:08 +0000 (22:37 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Wed, 6 Feb 2008 22:37:08 +0000 (22:37 +0000)
packages/python/python-2.5.1/sitecustomize.py
packages/python/python_2.5.1.bb

index b5e78d3..4c0ba3f 100644 (file)
@@ -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
 
index b274b0d..668c2a7 100644 (file)
@@ -7,7 +7,7 @@ DEPENDS = "python-native readline zlib gdbm openssl sqlite3 tcl tk"
 DEPENDS_sharprom = "python-native readline zlib gdbm openssl"
 
 # NOTE: Keep the digit in sync with BASEREV in contrib/generate-manifest-2.5.py
-PR = "ml7"
+PR = "ml8"
 
 PYTHON_MAJMIN = "2.5"