473,320 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to script DOS app that doesn't use stdout

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.
Jul 18 '05 #1
5 1275
"Gregor" <no****@nospam.nospam.edu> wrote in message
news:FMDWd.582995$6l.516471@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)?


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.
Jul 18 '05 #2
> "Gregor" <no****@nospam.nospam.edu> wrote in message
news:FMDWd.582995$6l.516471@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" <pw*****@redlinepy.com> wrote in
news:39*************@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.
Jul 18 '05 #3
On Sun, 06 Mar 2005 13:41:57 GMT, Gregor <no****@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.

--
Stand Fast,
tjg.
Jul 18 '05 #4
Timothy Grant <ti***********@gmail.com> wrote in
news:ma*************************************@pytho n.org:
On Sun, 06 Mar 2005 13:41:57 GMT, Gregor <no****@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.

Jul 18 '05 #5
"Phantom of the Keyboard" ... now that's a name!

Jul 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phil Powell | last post by:
<?php class FileRemoval { var $fileNameArray, $isRemoved, $errorMsg = ''; function FileRemoval() { $this->fileNameArray = array(); $this->isRemoved = 0; }
0
by: Phil Powell | last post by:
<?php class FileRemoval { var $fileNameArray, $isRemoved, $errorMsg = ''; function FileRemoval() { // CONSTRUCTOR $this->fileNameArray = array(); $this->isRemoved = 0; }
4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
4
by: dbee | last post by:
Right. I've got a really, really annoying/difficult/time consuming problem with my development environment. I'm using django to build a web app with paypal integration. My server is hosted...
7
by: Samuel A. Falvo II | last post by:
I have a shell script script.sh that launches a Java process in the background using the &-operator, like so: #!/bin/bash java ... arguments here ... & In my Python code, I want to invoke...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.