[Tutor] executing file properly

Vivian Tini v.tini at tu-bs.de
Tue Aug 7 12:20:29 CEST 2007


Dear All,

I am a newbie in Python and I would like to create command line interface for 
executing different softwares, either local or remotely. 

I begin with a very simple case in which I have an executable file called 
"TestCases" and this file requires Des.in as an the input. Both files are 
located in the same local folder.

The TestCases executable works properly when I run it from the shell prompt.

Then I try to run it from the Python command prompt by the following script:
>>> import os
>>> os.system("home/.../.../.../TestCases") 

I used "..." to type it short.

Then it gives the following error output:
cannot open Des.in 

Well in this case tbe os.system command is typed correctly already since this 
the error message given out is written in the code itself. So the executable 
run already only when running from Python prompt it cannot open this file.

Could anyone suggest me what would be the cause of this problem? And how 
should I handle it ?

Thank you in advance.

Vivian



More information about the Tutor mailing list