I redid the following:
 
import os
import sys
sys.path.append('C:\Program Files\EPANET2')
os.system('epanet2d.exe C:\simulation_test\Network3_1.inp C:\simulation_test\Network3_1.out')
 
and safed this as test.py
 
In the Pythonwin interface to run. I got nothing.
 
Then I added 'C:\Program Files\EPANET2' into the system path.
 
In the cmd line: I typed python c:\test.py. It ran and then gave the output.
 
Don' t know why command line works. but pythonwin interface failed .
 
Thanks.
J.

 
On 5/17/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
"Mu Mu" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED] ...
> 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

Any non zero return value means that an error occurred.
The os.system call worked and the OS returned an error, which
usually means you got a path wrong or the user running puython
doesn't have access rights to the executable.

> 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.

What happens if you try it from the Start->Run dialog?
The CMD box may have some environment settings that are missing
when Python runs.

Alan G.



_______________________________________________
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