Skip to content

Instantly share code, notes, and snippets.

@lichray
Created February 26, 2013 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lichray/5035916 to your computer and use it in GitHub Desktop.
Save lichray/5035916 to your computer and use it in GitHub Desktop.
setenv PYTHONSTARTUP this_file
import atexit
import os
import readline
import rlcompleter
hist_path = os.path.expanduser("~/.python/history")
readline.parse_and_bind("tab: complete")
readline.set_history_length(1000)
if os.path.exists(hist_path):
readline.read_history_file(hist_path)
atexit.register(readline.write_history_file, hist_path)
del atexit, readline, rlcompleter, hist_path
# add your own startup code below
import sys
import math
man = help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment