executing non-Python conde

E

Earl Eiland

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
 
L

Larry Bates

Earl said:
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
 
E

Earl Eiland

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,222
Messages
2,571,140
Members
47,755
Latest member
Grazynkaa

Latest Threads

Top