classification
Title: subprocess.pipe function
Type: feature request Stage:
Components: Library (Lib) Versions: Python 3.1, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, tebeka, vincent.legoll, vlegoll
Priority: normal Keywords: patch

Created on 2008-08-12 17:23 by tebeka, last changed 2008-09-02 08:26 by vlegoll.

Files
File name Uploaded Description Edit Remove
pipe.patch tebeka, 2008-08-12 17:23 Patch file for "subprocess.pipe"
toto.py vincent.legoll, 2008-08-26 13:02 alternate implementation (not a patch)
pipeline.py vincent.legoll, 2008-08-26 13:51 clean, doc & unit test (still not a patch)
pipeline.py vincent.legoll, 2008-09-01 14:57 new version (pylint, license, copyright)
Messages
msg71062 (view) Author: Miki Tebeka (tebeka) Date: 2008-08-12 17:23
Attached is a patch that add "pipe" command to the "subprocess" module.

pipe(["ls"], ["grep", "test_"]) will return the output of 
"ls | grep test_".
msg71063 (view) Author: Miki Tebeka (tebeka) Date: 2008-08-12 17:35
Not sure about the name, maybe "chain" will be better?
msg71978 (view) Author: Vincent Legoll (vincent.legoll) Date: 2008-08-26 13:02
Hello,

I was searching for a bug in subprocess
module when I saw your patch.

I was implementing the exact same functionality
and mixed some of your ideas in what I use now,
which is attached...

Feel free to use it
msg71979 (view) Author: Vincent Legoll (vincent.legoll) Date: 2008-08-26 13:51
Here's a clean version with doc & test

enjoy !
msg72257 (view) Author: Vincent Legoll (vincent.legoll) Date: 2008-09-01 14:57
- Added "shut pylint up" comment for ** keyword expansion
- Added Copyright & license header
msg72262 (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) Date: 2008-09-01 15:13
Vincent,
GPL licenced code is incompatible with the inclusion into python.
And if I am correct, you should sign a contributor agreement. Then the
licence text is not necessary.
msg72318 (view) Author: Legoll Vincent (vlegoll) Date: 2008-09-02 08:26
On Mon, Sep 1, 2008 at 5:13 PM, Amaury Forgeot d'Arc
<report@bugs.python.org> wrote:
> Amaury Forgeot d'Arc <amauryfa@gmail.com> added the comment:
>
> Vincent,
> GPL licenced code is incompatible with the inclusion into python.
> And if I am correct, you should sign a contributor agreement. Then the
> licence text is not necessary.

This is not a patch against python, this is a standalone script, just
implementing the same functionality as the original bug report in a
slightly different way...

But thanks for the input anyways.

If this functionality is really interesting people and agreed to be integrated
into upstream subprocess module, I can rework it the right way, or work
from the original patch from the bug report.
History
Date User Action Args
2008-09-02 08:26:01vlegollsetnosy: + vlegoll
messages: + msg72318
2008-09-01 15:13:54amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg72262
2008-09-01 14:57:59vincent.legollsetfiles: + pipeline.py
messages: + msg72257
2008-08-26 13:55:47pitrousetpriority: normal
versions: + Python 3.1, Python 2.7, - Python 2.6, Python 3.0
2008-08-26 13:51:19vincent.legollsetfiles: + pipeline.py
messages: + msg71979
2008-08-26 13:02:31vincent.legollsetfiles: + toto.py
nosy: + vincent.legoll
messages: + msg71978
2008-08-12 17:35:22tebekasetmessages: + msg71063
2008-08-12 17:23:58tebekacreate