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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -