Message114730
| Author |
aht |
| Recipients |
Netto, aht, amaury.forgeotdarc, tebeka, vincent.legoll, vlegoll |
| Date |
2010年08月23日.08:53:40 |
| SpamBayes Score |
0.00015901445 |
| Marked as misclassified |
No |
| Message-id |
<1282553622.36.0.540664580259.issue3548@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 |
|