command line editing
Skip Montanaro
skip at mojam.com
Wed Feb 9 17:27:48 EST 2000
Curtis> Would it be possible to include a history ability into the
Curtis> Python interpretor? Something simmilar to the BASH shell, or
Curtis> doskey in DOS. Up-Arrow prints the previous command. I think
Curtis> this would be a great new feature.
If you use a Unix-like operating system and have GNU readline handy, this is
already available (also see the rlcompleter module). Later on (probably
after 1.6), one thought is to have the interactive command loop coded in
Python so that you can more easily add this sort of stuff. In the meantime,
take a look at the source to the code module, especially the
InteractiveConsole class. You may be able to mangle it to do command
history.
Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/
"Languages that change by catering to the tastes of non-users tend not to do
so well." - Doug Landauer
More information about the Python-list
mailing list