473,287 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

cmd.Cmd bug or at least docu-bug

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
1 989
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: GS | last post by:
The stdint.h header definition mentions five integer categories, 1) exact width, eg., int32_t 2) at least as wide as, eg., int_least32_t 3) as fast as possible but at least as wide as, eg.,...
6
by: Just Me | last post by:
My Task List contains the following: At least one reference is missing the 'Name' attribute. Any suggestion on how toe find which project is missing it? Solution contains 25 projects. ...
1
by: Mark Fink | last post by:
Hi there, unfortunately I am new to Jython and my "Jython Essentials" book is still in the mail. I looked into the Jython API Doc but could not find the information. I am porting a Python...
44
by: Don Kim | last post by:
Ok, so I posted a rant earlier about the lack of marketing for C++/CLI, and it forked over into another rant about which was the faster compiler. Some said C# was just as fast as C++/CLI, whereas...
1
by: DoomedLung | last post by:
Hey, I'm currently developing an online work brief, where the user has to enter details regarding the project into a form. I've come to a section in the form where the user has the option of...
2
by: DoomedLung | last post by:
Hey, I'm currently developing an online work brief, where the user has to enter details regarding the project into a form. I've come to a section in the form where the user has the option of...
2
by: petermichaux | last post by:
Hi, It seems like determining element position in a web page is a difficult task. In the position reporting source code I've looked at there are special fixes for at least some versions of...
3
by: stressedstudent | last post by:
I dont know where I am going wrong so I dont know which part to post, this is what I have, can anyone help me figure out where I am going wrong? THanks for any and all help. // into to c++ //...
4
by: cathy25 | last post by:
Hi, I am new to programming in C#. Now, I am struck with a logic. I have a set of date fields (DateTime picker controls) . I need to find out the least date in those date fields. I tried the...
0
by: AAaron123 | last post by:
Been playing with asp:changepassword and have it looking OK except that I can't elininate or change the title at the top that says "Change Your Password". It's a repeat of my pages title. ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.