cmd.Cmd bug or at least docu-bug

Michele Simionato michele.simionato at gmail.com
Thu May 29 07:19:12 EDT 2008


On May 29, 11:26 am, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
> Hi,
>
> I'm fiddling around with module cmd. I tried to pass my own streams as
> replacements for stdin and stdout. However, stdin wasn't working. After a
> look into the sourcecode I discovered that there is an class-variable
> called
>
> use_rawinput
>
> that prevents using the passed stdin. I then read the docs again - and found
> it described. However, I think it should be mentioned on the first page
> where the constructor is described that without setting use_rawinput to
> False, stdin will be ignored.
>
> Or even better either make use_rawinput set to false in case stdin is passed
> anything but None or at least make it a keyword argument.
>
> Any thoughts about this?
>
> Diez

I run into the same issue and I solved it by using a custom subclass
of Cmd, but I agree
that the cmd module could be improved. I even wrote a cmd2 module that
I should publish
one day or another. +1 to submit a bug report.

 Michele Simionato



More information about the Python-list mailing list