.pythonrc 390 B

123456789101112131415161718
  1. # Python startup config file
  2. # Created by andreatsh
  3. import atexit, os
  4. import rlcompleter, readline
  5. readline.parse_and_bind('tab:complete')
  6. historyPath = os.path.expanduser("~/.pyhistory")
  7. def save_history(historyPath=historyPath):
  8. readline.write_history_file(historyPath)
  9. if os.path.exists(historyPath):
  10. readline.read_history_file(historyPath)
  11. atexit.register(save_history)