Message114730
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 |
|
Date |
User |
Action |
Args |
2010-08-23 08:53:42 | aht | set | recipients:
+ aht, amaury.forgeotdarc, tebeka, vlegoll, vincent.legoll, Netto |
2010-08-23 08:53:42 | aht | set | messageid: <1282553622.36.0.540664580259.issue3548@psf.upfronthosting.co.za> |
2010-08-23 08:53:40 | aht | link | issue3548 messages |
2010-08-23 08:53:40 | aht | create | |
|