Skip to content

Instantly share code, notes, and snippets.

@nicksloan
Last active December 12, 2015 12:29
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 nicksloan/4772240 to your computer and use it in GitHub Desktop.
Save nicksloan/4772240 to your computer and use it in GitHub Desktop.
import atexit
import os, sys
import readline
import rlcompleter
history = os.path.expanduser('~/.python_history')
readline.read_history_file(history)
readline.parse_and_bind('tab: complete')
atexit.register(readline.write_history_file, history)
if os.getenv('TERM') in ('xterm', 'xterm-color', 'rxvt', 'Eterm', 'putty'):
sys.ps1 = '0133[0;32m02>>> 0133[0m02'
sys.ps2 = '0133[0;32m02... 0133[0m02'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment