Output from two processes on shell (Python,Linux) -
my python script executes program sends output on shell. however, script should simultaneously execute own commands have output on shell. possible that? see output both script , process? here process has output on shell:
s.exe_cmd('./upgrade')
so, able write
print "my output..."
and see on shell to?
assuming you're using subprocess
- print both on console.
import subprocess p = subprocess.popen("sleep 1 && echo inside subprocess", shell=true) print("will print asynchronously") p.wait()
this example program can try out
Comments
Post a Comment