Last active
February 4, 2016 14:18
-
-
Save Svenito/f2825d5a005faeec30d5 to your computer and use it in GitHub Desktop.
Python startup file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python startup file | |
import readline | |
import rlcompleter | |
import atexit | |
import os | |
# tab completion | |
readline.parse_and_bind('tab: complete') | |
# history file | |
histfile = os.path.join(os.environ['HOME'], '.pythonhistory') | |
try: | |
readline.read_history_file(histfile) | |
except IOError: | |
pass | |
atexit.register(readline.write_history_file, histfile) | |
del os, histfile, readline, rlcompleter, atexit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
don't forge to del atexit too 😄