]> code.delx.au - dotfiles/blobdiff - .pythonrc.py
gitconfig: added expire-prune
[dotfiles] / .pythonrc.py
index 5d8a27418e8797aa70abfd62c509d06245a2f4fb..28b66f3e27c55d8ee23ec1a40defb9b06481ca9c 100644 (file)
@@ -33,28 +33,28 @@ except ImportError:
 
 # Readline completion of everything :)
 import rlcompleter, readline, atexit
-defaultCompleter = rlcompleter.Completer()
+default_completer = rlcompleter.Completer()
 
-historyPath = os.path.expanduser("~/.pyhistory")
+history_path = os.path.expanduser("~/.python_history")
 
-def myCompleter(text, state):
+def my_completer(text, state):
     if text.strip() == "":
         if state == 0:
             return text + "\t"
         else:
             return None
     else:
-        return defaultCompleter.complete(text, state)
+        return default_completer.complete(text, state)
 
-def save_history(historyPath=historyPath):
+def save_history(history_path=history_path):
     import readline
-    readline.write_history_file(historyPath)
+    readline.write_history_file(history_path)
 
-readline.set_completer(myCompleter)
+readline.set_completer(my_completer)
 readline.parse_and_bind("tab: complete")
 
-if os.path.exists(historyPath):
-    readline.read_history_file(historyPath)
+if os.path.exists(history_path):
+    readline.read_history_file(history_path)
 
 atexit.register(save_history)