Thank You!!
I am still new to Python!!
David Blubaugh
-----Original Message-----
From: Christian Heimes [mailto:lists@ch eimes.de]
Sent: Tuesday, September 30, 2008 2:08 PM
To: python-list@python.org
Subject: Re: OS.SYSTEM ERROR !!!
Blubaugh, David A. wrote:
Try this:
import subprocess
retval = subprocess.call (
['Myprogram.exe' , '1', '1', 'acc', '0'],
cwd='C:\myprogr amfolder\run')
Christian
This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named above. If you receive
this e-mail in error, please do not read, copy or disseminate it in any manner.
If you are not the intended recipient, any disclosure, copying, distribution or
use of the contents of this information is prohibited. Please reply to the
message immediately by informing the sender that the message was misdirected.
After replying, please erase it from your computer system. Your assistance in
correcting this error is appreciated.
I am still new to Python!!
David Blubaugh
-----Original Message-----
From: Christian Heimes [mailto:lists@ch eimes.de]
Sent: Tuesday, September 30, 2008 2:08 PM
To: python-list@python.org
Subject: Re: OS.SYSTEM ERROR !!!
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:\myprogramfol der\runMyprogra m.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")
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:\myprogramfol der\runMyprogra m.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")
import subprocess
retval = subprocess.call (
['Myprogram.exe' , '1', '1', 'acc', '0'],
cwd='C:\myprogr amfolder\run')
Christian
This e-mail transmission contains information that is confidential and may be
privileged. It is intended only for the addressee(s) named above. If you receive
this e-mail in error, please do not read, copy or disseminate it in any manner.
If you are not the intended recipient, any disclosure, copying, distribution or
use of the contents of this information is prohibited. Please reply to the
message immediately by informing the sender that the message was misdirected.
After replying, please erase it from your computer system. Your assistance in
correcting this error is appreciated.