Anh Hai Trinh <[email protected]> added the comment:
I've written a package which can do this with arbitrary redirection in all
subcommands (and some more).
You can, for example, do this:
>>> Pipe(Sh('echo -n foo >&2', {2: 1}), Sh('cat; echo ERROR >&2', {2:
os.devnull})).capture(1).read()
'foo'
The package is at: http://github.com/aht/pc.py
----------
nosy: +aht
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue3548>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com