473,419 Members | 1,541 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,419 software developers and data experts.

Running DOS App on win32 via python over ssh

Hello All,

I am helping someone write a python script to run their DOS application
through an SSH terminal. It seems that this program wants to access a
DOS shell and send output there. If running remotely, this causes a
problem because it locks up the program. The program seems (to me) to be
looking for some non-existant DOS shell to send its output to. How might
I emulate this shell (or whatever it is) with python? I have tried
several flavors of python (Enthought, ActiveState, etc.). I have tried
win32pipe.popen[1-4], and many other things that I can't even remember
now. My answer in the past has been to erase the hard drive and install
linux, but it seems that this person is insistent on using
windows/cygwin. Since I'm married to her, I'm afraid I'm reduced to
begging for assistance. BTW, I've googled a lot and read many threads,
most point to win32pipe. If I missed an obvious answer or search term,
please forgive me. I'm not really a windows guru.

The program in question, in case anyone doesn't understand this problem,
is lem:

http://spitswww.uvt.nl/web/fsw/mto/lem/lemdos.zip

Try running it locally via an xwindows started by cygwin & look to the
main cygwin window for output (what is special about this window?). Then
try sshing to your cygwin box and running. It locks up.

Thanks in advance,

James
Jan 17 '06 #1
3 1943
James Stroud wrote:
I am helping someone write a python script to run their DOS application
through an SSH terminal. It seems that this program wants to access a
DOS shell and send output there. If running remotely, this causes a
problem because it locks up the program. The program seems (to me) to be
looking for some non-existant DOS shell to send its output to. How might
I emulate this shell (or whatever it is) with python? I have tried
several flavors of python (Enthought, ActiveState, etc.). I have tried
win32pipe.popen[1-4], and many other things that I can't even remember
now.


What makes you think there's any DOS "shell" involved? Many DOS
programs didn't write to stdout, but drew directly into screen memory
with BIOS calls and such. Are you sure this is a more generic command
line program that just writes to "stdout" or the console?

-Peter

Jan 17 '06 #2
Peter Hansen wrote:
James Stroud wrote:
I am helping someone write a python script to run their DOS
application through an SSH terminal. It seems that this program wants
to access a DOS shell and send output there. If running remotely, this
causes a problem because it locks up the program. The program seems
(to me) to be looking for some non-existant DOS shell to send its
output to. How might I emulate this shell (or whatever it is) with
python? I have tried several flavors of python (Enthought,
ActiveState, etc.). I have tried win32pipe.popen[1-4], and many other
things that I can't even remember now.

What makes you think there's any DOS "shell" involved? Many DOS
programs didn't write to stdout, but drew directly into screen memory
with BIOS calls and such. Are you sure this is a more generic command
line program that just writes to "stdout" or the console?

-Peter


I honestly have no idea what this program is trying to do or whether a
DOS shell is involved. I'm just assuming based on the behavior. The
behavior is that if I start x-windows from the main cygwin terminal, and
then I run the program from xterm in x-windows, the output goes to the
main cygwin terminal from which I started x-windows. The output does not
go to the x-terminal. I assume that this bizarre behavior has something
to do with the fact that it freezes when running over SSH.

Also, FWIW, I believe the program was written in pascal and compiled
with turbo-pascal. The source is not available, though.

This is yet another reason why all thing microsoft suck!

James
Jan 17 '06 #3
James Stroud wrote:
The program in question, in case anyone doesn't understand this problem,
is lem:

http://spitswww.uvt.nl/web/fsw/mto/lem/lemdos.zip


Well, LEM.EXE calls RTM.EXE and RTM.exe contains signs of not being a
pure DOS program. It contains references to USER.EXE and KERNEL.EXE
(probably some old Windows 95 thing? ... LEM dates from 1997), and the
following string:
'''
You have attempted to run Windows in enhanced mode while
running in a shell under a protected mode program. This
is not a compatible configuration. Run Windows in standard
mode instead (win /S).
'''

Possibly what you are trying to do is not going to be feasible...

-Peter

Jan 18 '06 #4

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

Similar topics

2
by: Jorgen Grahn | last post by:
I couldn't think of a good solution, and it's hard to Google for... I write python command-line programs under Win2k, and I use the bash shell from Cygwin. I cannot use Cygwin's python package...
1
by: Brian Beck | last post by:
As far as I can tell, both maintainers of the Windows builds of Python-LDAP haven't updated in about a year. This doesn't exactly make the builds ancient or obsolete, but it would be nice to start...
17
by: los | last post by:
Hi, I'm trying to create a program similar to that of Google's desktop that will crawl through the hard drive and index files. I have written the program and as of now I just put the thread to...
0
by: cameron.mccloud | last post by:
Hi, When trying to import the WMI module in a Python Windows Service, I get the following: dynamic module does not define init function (initwmi) The WMI version is 0.6. Python 2.4 on...
28
by: Grant Edwards | last post by:
I finally figured out why one of my apps sometimes fails under Win32 when it always works fine under Linux: Under Win32, the pickle module only works with a subset of floating point values. In...
7
by: iclinux | last post by:
Environment: WinXP SP2 + Python 2.4.2, with SOAPpy-0.11.6.zip, fpconst-0.7.2.zip, and PyXML-0.8.4.win32-py2.4.exe installed. Problem: I'm reading DiveIntoPython these days. When running code...
18
by: cjl | last post by:
Hey: I am trying to run python from a usb drive under windows xp. I installed python "for this user" on to a machine, then copied the entire Python24 directory to the usb drive. I have the...
18
by: rdahlstrom | last post by:
Does anyone know how to determine the window status (Running or Not Responding)? I've tried various methods with no success... This would be on a variety of Windows systems, but all at least XP,...
1
by: Aspersieman | last post by:
Hi All I have a windows service (attached file). I basically just calls another script every 60 seconds. I can install, start and stop this service as expected with: ParseMailboxService.py...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.