Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9aaf1c2664
Fetching contributors…

Cannot retrieve contributors at this time

37 lines (28 sloc) 0.824 kb
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def startup():
import os
import inspect
def completion():
HOME = os.environ['HOME']
HISTORY_FILE = os.path.join(HOME, '.pythonhistory')
try:
import readline
except ImportError:
pass
else:
import rlcompleter
import atexit
# tab completion
readline.parse_and_bind('tab: complete')
# history file
try:
readline.read_history_file(HISTORY_FILE)
except IOError:
pass
atexit.register(readline.write_history_file, HISTORY_FILE)
for func in filter(lambda v: inspect.isfunction(v), locals().values()):
func()
startup()
del startup
# vim: ft=python
Jump to Line
Something went wrong with that request. Please try again.