Created
March 3, 2013 17:45
-
-
Save JohnSpeno/5077207 to your computer and use it in GitHub Desktop.
My .pythonrc file
This file contains hidden or 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
import rlcompleter | |
import atexit | |
import os | |
import readline | |
import sys | |
from pydoc import help | |
# Make TAB complete stuff | |
readline.parse_and_bind("tab: complete") | |
# Save our interpreter history between sessions | |
historyPath = os.path.expanduser("~/.pyhistory") | |
def save_history(historyPath=historyPath): | |
import readline | |
readline.write_history_file(historyPath) | |
if os.path.exists(historyPath): | |
readline.read_history_file(historyPath) | |
atexit.register(save_history) | |
# clean up | |
del os, atexit, readline, rlcompleter, save_history, historyPath |
Author
JohnSpeno
commented
Mar 3, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment