Anh Hai Trinh 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
<http://bugs.python.org/issue3548>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com