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 will be 1 (and not DATA: 1).
If you create an error (such as 1/0), then the error lines will be prefixed by 
DATA.

----------
components: Library (Lib)
messages: 138998
nosy: tebeka
priority: normal
severity: normal
status: open
title: Overriding code.InteractiveConsole.write does not work
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12402>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to