New submission from Miki Tebeka miki.teb...@gmail.com:
Consider the following code:
import code
class Console(code.InteractiveConsole):
def write(self, data):
print(DATA: {0}.format(data))
c = Console()
c.interact()
Then enter 1 at the prompt. The output
R. David Murray rdmur...@bitdance.com added the comment:
That's correct. The write method is for writing to stderr, and by implication
is called only for errors. Not, I think, the most obvious name that could have
been chosen for the method, but it does seem to be doing what it is documented
Miki Tebeka miki.teb...@gmail.com added the comment:
I'm trying to read/write data from a socket. Does this mean I need to roll up
my own Interpreter? (e.g. no way to override writing to stdout?)
Since this is the expected behaviour, will close this one.
--
status: closed - open
Changes by R. David Murray rdmur...@bitdance.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12402
___
___