lorenzo bolla’s blog

June 25, 2008

tab completion in python shell

Filed under: programming — Tags: , , — lbolla @ 11:52 am

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.

enjoy!

No Comments Yet »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.