running a dos program and catching the output

Miki Tebeka mikit at zoran.co.il
Sun Nov 30 07:39:06 EST 2003


Hello Guy,
> os.spawnl(os.P_WAIT,'rewrite.exe',infile,outfile,'/a')
> 
> And it doesn't work, what am I doing wrong?
IIRC the 1'st argument (to the program) should be the program name.
os.spawnl(os.P_WAIT,'rewrite.exe','rewrite.exe', infile,outfile,'/a')

> The dos box disappears too qucikly to see what the error is and ideally I don't want to see a dos box anyway.
Try redirecting the output to a file to catch the error.

HTH.
Miki




More information about the Python-list mailing list