How to script DOS app that doesn't use stdout

Gregor nospam at nospam.nospam.edu
Tue Mar 8 09:48:55 CET 2005


> "Gregor" <nospam at nospam.nospam.edu> wrote in message 
> news:FMDWd.582995$6l.516471 at pd7tw2no...
>
>> There's a DOS console application I am trying to script (in Python),
>> but it
>> doesn't seem to use stdout or stderr... For example, if I redirect
>> output to a file ("cmd > file.txt"), the output still appears on
>> screen. Similarly, the output pipes returned by popen* don't catch
>> the app's output. How might this app be generating its output? Any
>> thoughts on how it
>> could be captured (perhaps with something in the win32 extensions)?

"Paul Watson" <pwatson at redlinepy.com> wrote in
news:3920bqF5svrudU1 at individual.net: 

> The good-ole DOS app could be doing many things.  It could be making
> BIOS calls or writing directly to the video display memory at segment
> 0xB800. One would think that if it did a DUP of stdout that it might
> get captured, but apparently you have tried the popen* family.
> 
> Any hints as to what the DOS app is?  If it is known by anyone,
> perhaps a workaround is also known. 

Hmmm. Sounds like scripting this app might be a bit of a problem...

I don't think the program was available to the general public... It's 
called "PC-Bill." It's used to send doctors' bills to the Canadian 
government.

Greg.



More information about the Python-list mailing list