interpreter improvements

Skip Montanaro skip at pobox.com
Sat Jul 21 03:43:39 CEST 2001


    kevin> .... Couldn't the interpreter be improved to behave more like a
    kevin> real shell, with command history and maybe evn completion or (god
    kevin> forbid) keywork syntax coloring. Couldn't it support some basic
    kevin> shell commands like more and ls and such?  Even in wish i can
    kevin> type ls and get a listing.

Here's a ten-minute hack I posted a few days ago that does some minimal
guessing about shell commands:

    http://groups.google.com/groups?q=mycode.py+skip%40pobox.com&hl=en&safe=off&rnum=1&ic=1&selm=mailman.994974802.14320.python-list%40python.org

Knock yourself out... ;-)

As for command history and command completion, sounds like you must be stuck
on Windows.  Readline and rlcompleter do a decent job of command recall and
with the atexit module you can save the history file across sessions.

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list