By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,930 Members | 2,018 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,930 IT Pros & Developers. It's quick & easy.

cmd.Cmd bug or at least docu-bug

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On May 29, 11:26*am, "Diez B. Roggisch" <de...@nospam.web.dewrote:
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
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.