running a dos program and catching the output
From: Guy Robinson (guy_at_NOSPAM.r-e-d.co.nz)
Date: 11/30/03
- Next message: Raymond Hettinger: "Re: Filtering through an external process"
- Previous message: Mike Abel: "Re: Tkinter "Expected boolean value""
- Next in thread: Miki Tebeka: "Re: running a dos program and catching the output"
- Reply: Miki Tebeka: "Re: running a dos program and catching the output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 Nov 2003 20:41:13 +1300
Hello,
This works and correctly outputs the file out2.dwf
import os
test = os.popen("rewrite.exe test.dwf out2.dwf /a")
for L in test.readlines():
print L
this prints the statistics from the translation.
The things is I want to capture the output file for further processing.
I tried this:
infile = 'test.dwf'
outfile = 'out3.dwf'
os.spawnl(os.P_WAIT,'rewrite.exe',infile,outfile,'/a')
And it doesn't work, what am I doing wrong? The dos box disappears too
qucikly to see what the error is and ideally I don't want to see a dos
box anyway.
Regards,
Guy
- Next message: Raymond Hettinger: "Re: Filtering through an external process"
- Previous message: Mike Abel: "Re: Tkinter "Expected boolean value""
- Next in thread: Miki Tebeka: "Re: running a dos program and catching the output"
- Reply: Miki Tebeka: "Re: running a dos program and catching the output"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]