473,748 Members | 9,641 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1955
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
14360
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 because of a binary module which has to be compiled with Visual C 6. My scripts start with a '#!/usr/bin/env python' shebang, as God intended. Now, I assume I can make cmd.exe run foo.py by asociating *.py with the python interpreter.
1
2196
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 fresh with the latest version. I've tried without success in building it myself. The hardest part is simply that Python-LDAP is dependent on at LEAST two other projects -- OpenLDAP and Cyrus SASL. This increases the difficulty three-fold. ...
17
4008
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 sleep for 1 second after indexing a couple of files. I'm wondering if anyone knows of a way that I could make so that the program will run at full speed only runs after the computer has been idle for a while. I've looked at the "nice" command...
0
1136
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 Win32, Python Win32 extensions version 203
28
2674
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 particular the if you try to dump/load an infinity or nan value, the load operation chokes: Under Linux: $ python
7
4048
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 of "Example 12.11. Calling A Web Service Through A WSDL Proxy", I got some errors as follow. Will you please give me some suggestion? IDLE 1.1.2's Output:
18
6776
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 following in a batch file at the root of the drive: @path=%PATH%;%CD%Python24;%CD%Python24\libs;%CD%Python24\Scripts;%CD%Python24\Lib\site-packages;%CD%Python24\DLLs @set pythonpath = %CD%Python24
18
3252
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, and mostly server 2003. Everyone will have Python 2.5.1 on them, and the script would be running locally. Any ideas?
1
3034
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 install | start | stop The problem is: if I create an exe of this script (all required modules are included in the exe) with gui2exe (a frontend to py2exe) I can install the service - but not start it. The error it returns is "Error
0
8828
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.