Creating interactive command-line Python app?
d at davea.name
Thu Jan 3 15:41:31 CET 2013
On 01/03/2013 09:24 AM, Tim Chase wrote:
> (original post from planetthoughtful didn't seem to arrive here, so
> replying to Bob's reply)
>> Newbie to Python, and I'm wondering if it's possible to create a
>> Python console app that prompts for further input on the command
>> line when run (in Windows XP, if that's important)?
> While Bob's suggestion of "cliff" sounds interesting, Python also
> offers the "cmd" module in the standard library which does most of
> what I've needed in the past. If you've got the readline library
> available, it also supports autocompletion and command-line history
> which is a nice bonus.
> http://docs.python.org/2/library/cmd.html # py2.x
> http://docs.python.org/3/library/cmd.html # py3.x
> Docs should be about the same
The two replies in 2005 mentioned both raw_input and the cmd module (in
case that's what he was implying). They were posted within 90 minutes
of the original.
I assume that cliff is much more recent, and Bob wanted to update the
thread after 7 years.
More information about the Python-list