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

SourceForge.net noreply at sourceforge.net
Mon Aug 22 21:03:11 CEST 2005


Bugs item #1260171, was opened at 2005-08-15 12:15
Message generated for change (Comment added) made by josiahcarlson
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



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

Comment By: Josiah Carlson (josiahcarlson)
Date: 2005-08-22 12:03

Message:
Logged In: YES 
user_id=341410

Also, what you post is not a 'bug', it is a 'feature request'.

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

Comment By: Josiah Carlson (josiahcarlson)
Date: 2005-08-22 12:02

Message:
Logged In: YES 
user_id=341410

Would an asynchronous subprocess (which you would poll
manually) be better/sufficient?

http://python.org/sf/1191964

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

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