Dear all,
 
I tried the following:
 
>>> os.system(r'C:\\simulation test\\epanet2d.exe C:\\simulation test\\Network3_1.inp C:\\simulation test\\Network3_1.out')
1
>>> os.system('C:\simulation test\epanet2d.exe C:\simulation test\Network3_1.inp C:\simulation test\Network3_1.out')
1
>>> os.system(r'C:\simulation test\epanet2d.exe C:\simulation test\Network3_1.inp C:\simulation test\Network3_1.out')
1
>>> os.system(r'"C:\simulation test\epanet2d.exe"  "C:\simulation test\Network3_1.inp" "C:\simulation test\Network3_1.out"')
1
 
They all returned '1' in the interactive window and gave no result in the designated output folder. All I saw is a flash of the ms-dos black window and then disappeared.
 
I tried ms-dos command line, it works pretty good.
 
Thanks.
J.
 


 
On 5/17/06, w chun <[EMAIL PROTECTED]> wrote:
> I'm trying to call an executable program in Python. I did the following, but
> it doesn't work. Any help is appreciated.
>
> os.system('C:\Program Files\EPANET2\epanet2d.exe
> C:\simulation test\Network3_1.inp  C:\simulationtest\Network3_1.out')


try putting an "r" in front of the string, i.e. os.system (r'C:.....).

you mentioned "it doesn't work."  what do you mean by that?  in other
words, what did the Python interpreter do...  give an error, nothing,
etc.?

thanks,
-wesley

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
   http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
_______________________________________________
Tutor maillist  -   Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to