Roger Serwy <roger.se...@gmail.com> added the comment:

All good questions, Terry! I do have a git clone of the cpython repo, but I 
haven't worked through the new commit/patch process since Mercurial. I'm a bit 
rusty.

The buffering provided is for calls to `write`. It does not do any line 
buffering. Calls to `isatty` will behave the same. The negative side effect is 
that the subprocess will proceed as if writes have been committed to the 
PyShell window, so any pending transfers can be lost if the subprocess 
terminates unexpectedly.

I used a separate OS thread to handle the transfer of the writes rather than 
using the Tcl/Tk event loop. The Tcl/Tk loop runs on the main thread, so any 
long-running processes will prevent a `.after` callback function from being 
called.

The base class was not changed. I haven't followed all the changes to the 
stream class (and its implications) since 3.5, so the code subclasses the newer 
`StdOutputFile` class to minimize disruption.

----------

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

Reply via email to