Tag Archives: Interpreter

Python: autocomplete names with tab key [solved]

I learned a python trick that saved me a lot of time when using the interpreter. Just wanted to share it with you.

>>> import rlcompleter, readline
>>> readline.parse_and_bind("tab:complete")

With the above lines you’ll have a unix-like autocomplete for functions. For instance, if you type

>>> import os
>>> os.

And then you press “TAB” the list of OS module functions will show up. Ain’t it AWESOME? :>