cmd Library Module trouble

Fernando Perez fperez528 at yahoo.com
Sat May 15 00:31:44 EDT 2004


Juan Stang wrote:

> Hope someone can help ...
> 
> My Python sys.version prints out as follows:
> '2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)]'
> 
> I'm also running Windows XP SP1 and I have installed PyGame 1.6,
> wxWindows 2.5 and the latest Twisted dist. I only include these for
> the sake of completeness.
> 
> I'm trying to write something using the 'cmd' module, but I get the
> error below when I run the source included at the end of this post.
> It's pretty basic. This looks like a readline error, but the Python
> documentation states that the cmd module should be OS independent, and
> I'm not trying to use any readline features. Any ideas??? Please help!

There's no native Windows readline with python.  This means you have a
third-party readline module somewhere.  There's a readline out there
(Chris ....? wrote it, can't remember the name) which is _very_ problematic: it
does NOT expose the full readline API, so modules which try to import it
succeed initially, only to later crash horribly because the thing is very
incomplete.

If you want readline support under windows, google('uncpythontools'), you'll
find Gary Bishop's _excellent_ library, which adds proper ANSI color hanlding
to the pathetic Windows terminal.

Best,

f



More information about the Python-list mailing list