running a dos program and catching the output

Miki Tebeka mikit at
Sun Nov 30 13:39:06 CET 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.


More information about the Python-list mailing list