I\'m using a python script as a driver for a hydrodynamics code. When it comes time to run the simulation, I use subprocess.Popen to run the code, collect the
subprocess.Popen
import os def execute(cmd, callback): for line in iter(os.popen(cmd).readline, ''): callback(line[:-1]) execute('ls -a', print)