Files
procs/usage.py
T
Shrayas 14d54d88b2 Adresses #1
- Renames standard streams to ones without the underscore.
- Retains subprocess' way of doing returncode as opposed to exit_code
- t.py doesn't make sense, calling it usage.py
2014-10-31 01:02:38 +05:30

17 lines
242 B
Python

import pipes
chain = pipes.chain()
uptime = chain.process('uptime')
cowsay = chain.process('cowsay')
chain.link(uptime.stdout, cowsay.stdin)
chain.start(wait=True)
print cowsay.stdout
# ConnectedProcess
# ActiveProcess
# PassiveProcess