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

executing non-Python conde

P: n/a
I need to repeatedly execute an .exe program, changing the command line
arguments, and log the output.

My search of Python documentation and O'Reilly texts hasn't uncovered
how I do this. Both exec and execfile seem to only run Python code.
Also, neither seem to be able to pass parameters. (Although there is a
reference to global and local dictionaries that I don't understand.)

Surely there is a way to do this!

Earl Eiland

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


P: n/a
Earl Eiland wrote:
I need to repeatedly execute an .exe program, changing the command line
arguments, and log the output.

My search of Python documentation and O'Reilly texts hasn't uncovered
how I do this. Both exec and execfile seem to only run Python code.
Also, neither seem to be able to pass parameters. (Although there is a
reference to global and local dictionaries that I don't understand.)

Surely there is a way to do this!

Earl Eiland

os.system() or win32process.CreateProcess() depending on how much
control you want and/or if it is a Windows GUI .exe.

Larry Bates
Jul 18 '05 #2

P: n/a
So where do I find win32process.
It's not a builtin (at least import win32process fails)
A search of python.org fails.
A search of sourceforge fails.
A google search brings up lots of stuff, but I didn't find the module.

Earl Eiland

On Fri, 2005-03-11 at 09:02, Larry Bates wrote:
Earl Eiland wrote:
I need to repeatedly execute an .exe program, changing the command line
arguments, and log the output.

My search of Python documentation and O'Reilly texts hasn't uncovered
how I do this. Both exec and execfile seem to only run Python code.
Also, neither seem to be able to pass parameters. (Although there is a
reference to global and local dictionaries that I don't understand.)

Surely there is a way to do this!

Earl Eiland

os.system() or win32process.CreateProcess() depending on how much
control you want and/or if it is a Windows GUI .exe.

Larry Bates


Jul 18 '05 #3

P: n/a
Earl Eiland wrote:
So where do I find win32process.
It's not a builtin (at least import win32process fails)
A search of python.org fails.
A search of sourceforge fails.
A google search brings up lots of stuff, but I didn't find the module.

Earl Eiland

[...]

http://starship.python.net/crew/mhammond/

google-is-your-friend-ly y'rs - steve
--
Steve Holden +1 703 861 4237 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/

Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.