History for Command Line Program

Aahz Maruch aahz at panix.com
Thu Sep 21 11:32:43 EDT 2000


In article <39CA224E.47DF03CF at bioeng.ucsd.edu>,
Curtis Jensen  <cjensen at bioeng.ucsd.edu> wrote:
>
>I've built a command line driven program.  We'd like to put a history
>option in it.  We want to be able to press the up arrow and it will give
>us the last command typed, and consequent up arrow presses will give the
>one before that, and so on (Similar to the Bash shell).  We don't have
>the curses module intalled.  Is there a way I could capture the up
>arrow, without the curses module?  Thanks.

Use the readline module.  You may have to compile it in; see README for
more info.
-- 
                      --- Aahz (Copyright 2000 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Member of the Groucho Marx Fan Club  --Aahz



More information about the Python-list mailing list