Re: OS.SYSTEM ERROR !!!
- From: Carsten Haese <carsten.haese@xxxxxxxxx>
- Date: Tue, 30 Sep 2008 13:39:05 -0400
Blubaugh, David A. wrote:
To All,
I have been attempting to execute the following program within the
Python environment:
Myprogram.exe, which means this is an executable file!!
I would usually execute this program (with the appropriate arguments) by
going to following directory within MS-DOS (Windows XP):
C:\myprogramfolder\run> Myprogram.exe 1 1 acc 0
The executable would execute perfectly.
However, when I would try to execute the following lines of source code
within a python script file:
import os
os.system(r"C:\myprogramfolder\run\Myprogram.exe 1 1 acc 0")
The executable file would start to execute until it would print an error
stating that it cannot use a (.dat) file, which is located under the
following directory:
C:\myprogramfolder\run\inputs\io\control.dat
I believe I may be missing something here that prevents the executable
file working within python from utilizing this (.dat). The printed
final error is the following:
ERROR opening inputs/io/control.dat
Does anyone know what that could be ??
The program (myprogram.exe) is not looking for
C:\myprogramfolder\run\inputs\io\control.dat, it's looking for
inputs/io/control.dat relative to its current working directory. That
will only work if the current working directory of the program is
C:\myprogramfolder\run. Is it?
--
Carsten Haese
http://informixdb.sourceforge.net
.
- References:
- OS.SYSTEM ERROR !!!
- From: Blubaugh, David A.
- OS.SYSTEM ERROR !!!
- Prev by Date: Re: r"<path>"
- Next by Date: Re: OS.SYSTEM ERROR !!!
- Previous by thread: OS.SYSTEM ERROR !!!
- Next by thread: Re: OS.SYSTEM ERROR !!!
- Index(es):
Relevant Pages
|