MonkeeSage wrote: > utabintarbo wrote: > > pid = subprocess.Popen([app] + lstArgs).pid > > Check out the poll() method and the returncode attribute: > http://docs.python.org/lib/node533.html >
Thanks for the reply. If I understand your meaning, I should do something like this (given I wish to run an app against several arguments [my use case]): for lstArgs in pileOflstArgs: uniqueProcessID = subprocess.Popen([app] + lstArgs) pid = uniqueProcessID.pid retcode = uniqueProcessID.poll() # increment uniqueProcessID .... If so, how do I handle the poll() on long-running processes? Run a bunch and then start a check loop? Am I asking too many questions? -- http://mail.python.org/mailman/listinfo/python-list