I hope I have not overlooked a solution already posted, but I seem to
be unable to suss out a way to achieve both multiple console-less
executions of a given (console) application and gathering the return
code from the application.

What I have found:
<code>
import subprocess

# gives back return code, but does not run asynchronously
retcode = subprocess.call([app, lstArgs])
retcode = subprocess.Popen([app] + lstArgs).wait()
# runs the app async, but only returns the pid (no return code)
pid = subprocess.Popen([app] + lstArgs).pid
</code>

Is there some magic elixir which will get me both?

TIA

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to