summaryrefslogtreecommitdiff
path: root/lib/pythonrc
blob: 89408a751a6cf383866c8eafadf53564db88a92b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import pdb
import pprint
import rlcompleter
import readline
import sys
import importlib

# enable tab completion
readline.parse_and_bind("tab: complete")

# also get tab completion in pdb
pdb.Pdb.complete = rlcompleter.Completer(locals()).complete

# prettyprint with p()
pp = pprint.PrettyPrinter(indent=4, width=80)
p = pp.pprint

# reload a module with r(module)
r = importlib.reload