473,385 Members | 1,329 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,385 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 993
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. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.