[issue2571] cmd.py always uses raw_input, even when another stdin is specified

Raghuram Devarakonda report at bugs.python.org
Mon Apr 7 22:54:40 CEST 2008


Raghuram Devarakonda <draghuram at gmail.com> added the comment:

The doc for "cmd" at
http://docs.python.org/dev/library/cmd.html#module-cmd says:

"Instances of Cmd subclasses have some public instance variables:
.
.
.
Cmd.use_rawinput¶
    A flag, defaulting to true. If true, cmdloop() uses raw_input() to
display a prompt and read the next command; if false, sys.stdout.write()
and sys.stdin.readline() are used. (This means that by importing
readline, on systems that support it, the interpreter will automatically
support Emacs-like line editing and command-history keystrokes.)"

So it is for the user to modify use_rawinput as required. This flag has
been introduced in #405952. BTW, this one and other similar variables
are at class level and are not instance variables. Isn't it?

----------
nosy: +draghuram

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2571>
__________________________________


More information about the Python-bugs-list mailing list