Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 17th, 2006, 04:05 AM
James Stroud
Guest
 
Posts: n/a
Default 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
  #2  
Old January 17th, 2006, 07:05 AM
Peter Hansen
Guest
 
Posts: n/a
Default Re: Running DOS App on win32 via python over ssh

James Stroud wrote:[color=blue]
> 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.[/color]

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

  #3  
Old January 17th, 2006, 07:45 PM
James Stroud
Guest
 
Posts: n/a
Default Re: Running DOS App on win32 via python over ssh

Peter Hansen wrote:[color=blue]
> James Stroud wrote:
>[color=green]
>> 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.[/color]
>
>
> 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
>[/color]

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
  #4  
Old January 18th, 2006, 12:25 AM
Peter Hansen
Guest
 
Posts: n/a
Default Re: Running DOS App on win32 via python over ssh

James Stroud wrote:[color=blue]
> The program in question, in case anyone doesn't understand this problem,
> is lem:
>
> http://spitswww.uvt.nl/web/fsw/mto/lem/lemdos.zip[/color]

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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles