Re: OS.SYSTEM ERROR !!!



On Sep 30, 1:21 pm, "Blubaugh, David A." <dbluba...@xxxxxxxxxx> wrote:
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
[snip]
import os

os.system(r"C:\myprogramfolder\run\Myprogram.exe 1 1 acc 0")
[snip]
ERROR opening inputs/io/control.dat
[snip]

I would add the following line right before your call to os.system:

os.chdir(r'C:\myprogramfolder\run')

If you have to change directories to run it properly in the Windows
shell, then you need to do it in Python, too.

HTH,
Geoff G-T

.



Relevant Pages

  • Re: 16 Bit Error
    ... meant for earlier versions of Windows. ... which is 16 Bit MS-DOS Subsystem. ... sure that the directory path exists, and disk space is available. ... problem and they are trying to install a 16-bit program on purpose.... ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Wildcard on Folder Name
    ... This is not DOS - it is the Command Prompt. ... Microsoft Windows XP - Command-line reference A-Z ... Microsoft Windows XP - MS-DOS subsystem commands ...
    (microsoft.public.windowsxp.general)
  • Re: working storage values
    ... If it were up to IBM, we'd still be using green screens. ... Windows 95 did that. ... bundling of Windows 3.1 with MS-DOS (at ... competition was gone, he introduced the 'real' machine, priced for healthy profit. ...
    (comp.lang.cobol)
  • Re: DOS Auto Boot Into Windows XP
    ... Restart the machine. ... Windows XP needs to load from the hard drive. ... I put an MS-DOS startup disk in my A: ...
    (microsoft.public.windowsxp.general)
  • Re: Command in Windows
    ... MS-DOS and does not include MS-DOS at all. ... WinXP does have an excellent emulator that runs most MS-DOS ... Command Prompt and using the Properties screen, much as we used the PIF ... to learn more about "Getting older programs to run on Windows XP". ...
    (microsoft.public.windowsxp.general)