[ python-Bugs-1260171 ] subprocess: more general (non-buffering) communication

SourceForge.net noreply at sourceforge.net
Mon Aug 15 21:15:12 CEST 2005


Bugs item #1260171, was opened at 2005-08-15 14:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1260171&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Ian Bicking (ianbicking)
Assigned to: Nobody/Anonymous (nobody)
Summary: subprocess: more general (non-buffering) communication

Initial Comment:
Right now you can use subprocess.Popen.communicate() to
make communication with subprocesses much easier and
less likely to block than communicating directly with
.stdin, .stdout, etc.  However, that requires
completely buffering the input and output.

The functionality of communicate() (which is somewhat
complex because of platform issues) could be made more
general fairly easily.  The current functionality of
communicate could then be implemented in terms of that
new method.

I attached a function I'm using which does that for the
posix systems (basically turning Popen's posix
communicate into a function with some modifications). 
Replace "proc" with "self" (and give the function a
better name) and you'd have a method.

If patch 1175984 was accepted, then this wouldn't be
that much of an issue:
http://sourceforge.net/tracker/index.php?func=detail&aid=1175984&group_id=5470&atid=305470



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1260171&group_id=5470


More information about the Python-bugs-list mailing list