executing non-Python conde

Steve Holden steve at holdenweb.com
Fri Mar 11 16:27:13 CET 2005

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
Yes. os.popen, popen.popen{2,3,4}, os.system, ... take your pick!

Steve Holden        +1 703 861 4237  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/
Python Web Programming  http://pydish.holdenweb.com/

More information about the Python-list mailing list