linux console command line history

kaklis at gmail.com kaklis at gmail.com
Wed Jul 21 04:03:27 EDT 2010


On Jul 21, 9:03 am, Michele Simionato <michele.simion... at gmail.com>
wrote:
> On Jul 20, 11:38 pm, "kak... at gmail.com" <kak... at gmail.com> wrote:
>
> > Hi to all,
> > I 'm writing a linux console app with sockets. It's basically a client
> > app that fires commands in a server.
> > For example:
> > $log user 55
> > $sessions list
> > $server list etc.
> > What i want is, after entering some commands, to press the up arrow
> > key and see the previous commands that i have executed.
> > Any hints? Any examples?
>
> > Antonis
>
> You may find interesting to look at the source code for plac (http://
> micheles.googlecode.com/hg/plac/doc/plac_adv.html). The readline
> support (including command history and autocompletion) is implemented
> in the ReadlineInput class (seehttp://code.google.com/p/micheles/source/browse/plac/plac_ext.py).
> If you just want command history you can use rlwrap (http://
> freshmeat.net/projects/rlwrap).

That's great! thank you so much Michele!

Antonis



More information about the Python-list mailing list