This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: cmd.Cmd().cmdloop() can't read from file
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder: can cmd.py's API/docs for the use of an alternate stdin be improved?
View: 2571
Assigned To: Nosy List: ajaksu2, georg.brandl, jamesthiele
Priority: normal Keywords:

Created on 2005-03-03 23:06 by jamesthiele, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg60692 - (view) Author: jamesthiele (jamesthiele) Date: 2005-03-03 23:06
cmd.Cmd() takes three parameters, the second of which is a file to 
use instead of standard input by resetting self.stdin. The substitute 
input is never used.

The problem is that 'use_rawinput' is set to 1 and not changed. This 
means that raw_input() is always used and self.stdin.readline() is 
never used.
msg65406 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2008-04-12 17:13
Superseded by #2571
The user can change cmd.Cmd.use_rawinput to False and get the desired
behaviour.
msg65411 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-04-12 18:29
Closing as duplicate.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41649
2008-04-12 18:29:33georg.brandlsetstatus: open -> closed
resolution: duplicate
superseder: can cmd.py's API/docs for the use of an alternate stdin be improved?
messages: + msg65411
nosy: + georg.brandl
2008-04-12 17:13:46ajaksu2setnosy: + ajaksu2
messages: + msg65406
2005-03-03 23:06:25jamesthielecreate