Skip to content

Instantly share code, notes, and snippets.

@megahall
Last active November 11, 2015 23:24
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 megahall/db1cf356dca1d7c73108 to your computer and use it in GitHub Desktop.
Save megahall/db1cf356dca1d7c73108 to your computer and use it in GitHub Desktop.
# export PYTHONSTARTUP=~/.pythonrc
import atexit
import base64
import binascii
import json
import os
import re
import socket
import string
import struct
import sys
import uuid
from datetime import datetime, timedelta
from pprint import pprint
from urlparse import urlparse
import readline
import rlcompleter
readline.parse_and_bind("tab: complete")
history_path = os.path.expanduser("~/.python-history")
if os.path.exists(history_path):
readline.read_history_file(history_path)
def save_history(history_path=history_path):
readline.write_history_file(history_path)
atexit.register(save_history)
del save_history, history_path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment