New submission from Richard King [EMAIL PROTECTED]:
The module global value use_rawinput is initialized to 1 but not reset
when stdin is replaced with a passed-in value.
--
components: Extension Modules
messages: 65094
nosy: rickbking
severity: normal
status: open
title: cmd.py always
New submission from Richard King [EMAIL PROTECTED]:
Add an input method or property that saves the current input file
object and resets the input file object; when input results in an EOF,
the input file object stack is popped and reading continues from there.
A modified cmd.py is attached
Richard King [EMAIL PROTECTED] added the comment:
(this is really 2 mails because my home email address was not registered so
they were rejected at first)
Right - I wasn't too clear. The module stashes stdin, whether from sys
or passed in, in self.stdin. When it reads input it uses a flag
Richard King [EMAIL PROTECTED] added the comment:
There were some other things I wanted too so I just made my own cmd.py.
-Rick
Raghuram Devarakonda wrote:
Raghuram Devarakonda [EMAIL PROTECTED] added the comment:
Richard, I see the following very clearly mentioned in the doc:
If you want
Richard King rickbk...@comcast.net added the comment:
ok, thanks.
R. David Murray wrote:
R. David Murray rdmur...@bitdance.com added the comment:
Since it's been almost a year and the OP hasn't responded with an
updated patch, I'm closing this as out of date.
--
nosy: +bitdancer
New submission from Richard King :
x = ['a']
x += ' ' results in ['a',' ']
x = x + ' ' results in an exception:
Traceback (most recent call last):
File "", line 1, in
TypeError: can only concatenate list (not "str") to list
It behaves the same in 2.7.15 and 3.7.2.
-