I use standard tips for customizing interactive Python session:
$ cat ~/.bashrc export PYTHONSTARTUP=~/.pystartup $ cat ~/.pystartup import os import sys import
For a better python shell experience, I'd recommend you to use either ipython or bpython.