running an outside program (executable) in python?

Posted by Mesut on Stack Overflow See other posts from Stack Overflow or by Mesut
Published on 2009-11-28T05:36:50Z Indexed on 2010/03/20 10:01 UTC
Read the original article Hit count: 404

Filed under:
|

Hello all, I just started working on python and I have been trying to run an outside executable form python. I have an executable for a program written in Fortran. Lets say the name for the executable is flow.exe. And my executable is lacated in C:\Documents and Settings\flow_model I tried both os.system and popen commands but so far couldnt make it work. The following code seems like opens the command window but wouldnt execute the model.

# Import system modules
import sys, string, os, arcgisscripting
os.system("C:/Documents and Settings/flow_model/flow.exe")

Any suggestions out there? Any help would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about python

Related posts about executable