Terry J. Reedy added the comment:
Currently, when Idle is started from a command line or console interpreter,
"import os; os.system('dir')" produces the listing in the console window, as
expected.
Reading the patch, it *augments* one-channel socket communication, which
properly* combines and serializes stdout and stderr messages, with two-channel
pipe communication. This is rather messy and leads to inter-mixed displays, as
reported. If sensibly possible, the process stdout/err (fileno 1&2) written to
by the os functions in question should forward bytes to the idle process via
the rpc channel, properly labelled as stdout or stderr.
* There is a bug where the second prompt of a shell session gets intermixed
with previous output or clipboard content, but I do not have a repeatable test
case yet.
Issue #18823 is about *replacing* the socket with pipes (whether using
subprocess or multi-processing or whatever.). (There should still be just one
channel, not two, from user process to Idle process to keep the rpc protocol in
control of what the Idle process receives.) About last August, Roger sent at
least a few of us somewhat large proof of concept patch, which I have not
reviewed yet.
The patch uses Tk.createfilehandler, which seems not to exist on Windows, so I
cannot review further.
File "F:\Python\dev\34\lib\tkinter\__init__.py", line 1932, in __getattr__
return getattr(self.tk, attr)
AttributeError: 'tkapp' object has no attribute 'createfilehandler'
File "F:\Python\dev\34\lib\tkinter\__init__.py", line 1932, in __getattr__
return getattr(self.tk, attr)
AttributeError: 'tkapp' object has no attribute 'createfilehandler' File
"F:\Python\dev\34\lib\tkinter\__init__.py", line 1932, in __getattr__
return getattr(self.tk, attr)
AttributeError: 'tkapp' object has no attribute 'createfilehandler'
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11820>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com