On Mar 4, 10:44 am, Ron DuPlain <[EMAIL PROTECTED]> wrote: > On Mar 4, 10:13 am, Siddhant <[EMAIL PROTECTED]> wrote: > > > Hi people. > > I was just wondering if a tab-completion feature in python command > > line interface would be helpful? > > If yes, then how can I implement it? > > Thanks, > > Siddhant > > ipython provides auto tab completion.http://ipython.scipy.org/ > > You can also get it by: > $ easy_install ipython > > Run it using the command: > $ ipython > > Is this what you want?
ipython also makes stack traces nearly unreadable by default (setting "xmode Plain" in the ipythonrc fixed that) and tends to take up too much vertical screen space, wants to colorize a lot of stuff, and has a few other things that I was't fond of. There's some nice stuff in ipython (saving the return values of every line in the shell), but I found trying to configure off all of the "magically helpful" stuff that wound up being more annoying than useful was a fairly long job. I found it easier just to turn on completion in the regular python shell. From my .pythonrc: try: import readline except ImportError: print "Module readline not available." else: import rlcompleter readline.parse_and_bind("tab: complete") del readline, rlcompleter With that and persistent history I'm pretty happy: import readline histfile = os.path.join(os.environ["HOME"], ".pyhist") try: readline.read_history_file(histfile) except IOError: pass import atexit atexit.register(readline.write_history_file, histfile) del os, histfile -- http://mail.python.org/mailman/listinfo/python-list