import rlcompleter import readline readline.parse_and_bind("tab: complete") import sys, os, readline, rlcompleter, atexit from glob import glob sys.path.append('/home/pat/.pylib/') from BeautifulSoup import BeautifulSoup, BeautifulStoneSoup, UnicodeDammit from urllib import urlopen history_file = os.path.join(os.environ['HOME'], '.python_history') try: readline.read_history_file(history_file) except IOError: pass readline.parse_and_bind("tab: complete") readline.set_history_length(5000) atexit.register(readline.write_history_file, history_file) #del os, readline, rlcompleter, atexit, history_file, __file__ startupDir = os.path.dirname(os.getenv('PYTHONSTARTUP')) sys.path.append(startupDir) for file in os.listdir(startupDir): path = os.path.join(startupDir, file) if file.lower() == 'override': sys.path.insert(2, path) else: sys.path.append(path) del(startupDir) del(file) del(path)