From 8c92bc399732c02721ed5432815b95c818e1b90b Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 16 Apr 2020 21:30:51 -0700 Subject: Add python startup files --- lib/pythonrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 lib/pythonrc (limited to 'lib/pythonrc') diff --git a/lib/pythonrc b/lib/pythonrc new file mode 100644 index 0000000..ec59d2b --- /dev/null +++ b/lib/pythonrc @@ -0,0 +1,15 @@ +import os +import pdb +import pprint +import rlcompleter, readline +import sys + +# 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 -- cgit v1.2.3