By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,551 Members | 1,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,551 IT Pros & Developers. It's quick & easy.

blocking a program until a non-Python process terminates

P: n/a
I'm running an .exe in Python, using subProcess.Popen. The executable
writes data to a file I process later on in the program. Unfortunately,
my program returns the error "no such file...". How do I block
execution until the external executable terminates?

Earl

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Earl Eiland wrote:
I'm running an .exe in Python, using subProcess.Popen. The executable
writes data to a file I process later on in the program. Unfortunately,
my program returns the error "no such file...". How do I block
execution until the external executable terminates?


Either:

1)

returncode = subprocess.call(cmdline)

2) or:

pipe = subprocess.Popen(cmdline)
returncode = pipe.wait()
--
Michael Hoffman
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.