473,722 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Processes/pipes cross platform issue - popen*() hangs using "rsh/rlogin" (not working in Windows vs. Linux)

Background.

I'm running on WinXP w/ MS Services for Unix installed (to give
rsh/rlogin ability), both Python 2.3 and 2.4 version. In linux, I'm
running RHEE with python2.3 version. The code below works fine for me
in linux, but in WinXP the popen*() command "hangs". More
specifically, I get an apparent python prompt (without the '>>> ', but
whatever I type has no effect, and hitting return does a CR but not
the additional LF, so I just type over what I had just typed). The
only way I can exit is with CTRL-BREAK, and rerun python. I've tried
the various flavors of popen[2|3|4], and the subprocess module in
python2.4, all with the same "bug".

Also, rsh/rlogin from windows DOS prompt work just fine.

Can anyone clue me in as to how to make this work in windows, or an
equivalent solution?

The gist of what I'm doing is this
-------------
import os
p = os.popen3("rsh LINUX_MACHINE.c om -l USER")
p[0].writelines(["touch rsh_as_USER.txt \n",])
p[0].close()

In linux, the target machine will then have the .txt file touch'ed.

Thanks.
-Dave
Jul 18 '05 #1
0 1648

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

Similar topics

2
4323
by: Lukas Schnieper | last post by:
Hi all I work with Suse Linux 8.2 and Python 2.2.2 I'm trying to make a python script which makes a rlogin to another system and executes there another script. So it looks like this: os.system("rlogin <hostname>") os.system("./myscript.py") The rlogin is ok. I can give in my password and i'm on the other host.
2
4793
by: walala | last post by:
Dear all, I recently came across a Python program which used "telnetlib" to automate things in the several unix machines in our local networks; I attached the script as follows; I wonder if it is possible to have the equivlent libary for "rlogin" in Python? Because our local networks support only SSH or RLOGIN. This script used Telnet so it could not be used in our local networks;
2
1711
by: clusardi2k | last post by:
vbscript and/or javascript is most likely what I want to use! >From a SGI and a Linux box with a known PID, how do I determine if that process is running on a Windows computer? Please explain to me how to do this with vbscript and/or with javascript! Which language is better? Speed is a very important limitation, so which language is faster in batch processing? On unix, I would use something such as "ps -p<PID>" to determine the...
2
3512
by: Bimal | last post by:
Hi, I am trying to setup 2 logical nodes in a same instance. I changed the db2nodes.cfg file as 0 db2 0 1 db2 1 i also added db2 an entry db2 in my hosts.allow file
3
16232
by: edmundleungs | last post by:
I have a db2 account on AIX. After connecting to AIX using SSH, i use the account to connect to DB. When I use "db2 connect <DB name>", it works fine. However, when i use "db2 connect to <DB name> user <DB account> using <PASSWD>", the following error exist:
13
3156
by: Godzilla | last post by:
Hello, How do you create/spawn new processes in XP over telnet using python? I.e. I would like to create a new process and have it running in the background... when I terminate the telnet connection, I would what the spawned processes to keep running until I shut it off... I got the os.popen method to spawn a new process running in the backgroun, but not over telnet... tried os.popen and also subprocesses.popen without any luck...
1
2159
by: jordan.mccheyne | last post by:
I am running an RSH command through a Visual Studio 2005 app written in c++. I am using a ShellExecuteEx to run the command. If the user has Windows 2000, the RSH command completes correctly but the black DOS window that comes up as the RSH is executing never goes away. It just hangs there like the command never completes. In Windows XP, I do not have this problem, the RSH window goes away after the RSH completes. Does anyone know why...
1
1625
by: jordan.mccheyne | last post by:
I am running an RSH command through a Visual Studio 2005 app written in c++. I am using a ShellExecuteEx to run the command. If the user has Windows 2000, the RSH command completes correctly but the black DOS window that comes up as the RSH is executing never goes away. It just hangs there like the command never completes. In Windows XP, I do not have this problem, the RSH window goes away after the RSH completes. Does anyone know why...
0
8860
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
8739
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
9382
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9236
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...
0
9087
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...
0
5995
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();...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2601
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2147
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.