This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Thekent, akira, ned.deily, ppperry, roger.serwy, serhiy.storchaka, terry.reedy
Date 2014-11-12.00:39:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1415752764.69.0.871719787342.issue11820@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2014-11-12 00:39:24terry.reedysetrecipients: + terry.reedy, ned.deily, roger.serwy, akira, Thekent, serhiy.storchaka, ppperry
2014-11-12 00:39:24terry.reedysetmessageid: <1415752764.69.0.871719787342.issue11820@psf.upfronthosting.co.za>
2014-11-12 00:39:24terry.reedylinkissue11820 messages
2014-11-12 00:39:24terry.reedycreate