mirror of
https://github.com/kennethreitz-archive/procs.git
synced 2026-06-05 23:30:18 +00:00
16 lines
244 B
Python
16 lines
244 B
Python
import pipes
|
|
|
|
chain = pipes.chain()
|
|
|
|
uptime = chain.process('uptime')
|
|
cowsay = chain.process('cowsay')
|
|
|
|
chain.link(uptime.std_out, cowsay.std_in)
|
|
chain.start(wait=True)
|
|
|
|
print cowsay.std_out
|
|
|
|
|
|
# ConnectedProcess
|
|
# ActiveProcess
|
|
# PassiveProcess |