How to script DOS app that doesn't use stdout

Gregor nospam at nospam.nospam.edu
Wed Mar 9 03:27:32 EST 2005


Timothy Grant <timothy.grant at gmail.com> wrote in
news:mailman.111.1110305665.1799.python-list at python.org: 

> On Sun, 06 Mar 2005 13:41:57 GMT, Gregor <nospam at nospam.nospam.edu>
> wrote: 
>> 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)? 
>> 
>> Thanks,
>> 
>> Greg.
> 
> I've had to do this a couple of times but never in recent years. I
> don't know your exact needs, but the best tool I ever found for this
> sort of job was called Phantom of the Keyboard.
> 
> I ran into a couple of apps that I needed data out of and couldn't get
> it. They'd only output to screen, never to disk. I used Phantom to
> automate the app to dump data to screen and then capture the screen to
> disk.
> 

Hmmm, interesting. I'll give that app a try. Thanks for the info.

Greg.




More information about the Python-list mailing list