Home | Articles | CV (pdf | short)
<2008-06-25> by Lorenzo

Tab completion in Python shell

Recently I saw with this little piece of code to give the standard python shell tab completion capabilities:

# setup tab completion in python shell
import rlcompleter
import readline
readline.parse_and_bind("tab: complete")

Obviously, you can use the environmental variable PYTHONSTART to execute this few lines anytime you start your python shell.