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

Re: Execute a script on a remote machine

This is ok.
Is there any other way to find it out?
Thanks,
Srini

----- Original Message ----
From: Gerhard Häring <gh@ghaering.de>
To: py*********@python.org
Sent: Friday, 20 June, 2008 10:03:30 PM
Subject: Re: Execute a script on a remote machine

srinivasan srinivas wrote:
Hi,
My requirement is i have to execute a python script on a remote machine as a subprocess from a python script and to get the subprocess pid of the process running the script. Is there anyway to do that??
I have used subprocess.popen() method to do that. I have done as following:
executable = '/usr/bin/rsh'
args = [executable, hostname, scriptname]
pid = subprocess.popen(args)
It returned the pid of rsh. Buti am interested in the pid of the process running the script.
Can anyone help me out here?
Using os.getpid() you can find out the pid of thescript and communicate
it back to the caller.

-- Gerhard

--
http://mail.python.org/mailman/listinfo/python-list

Save all your chat conversations. Find them online at http://in.messenger.yahoo.com/webmessengerpromo.php
Jun 27 '08 #1
0 2012

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

Similar topics

7
by: Nick Messick | last post by:
I'm trying to modify a banner display function so it can be including on remote websites. If I just include the file from a remote website the code isn't executed before it is put into the page. ...
2
by: miles111 | last post by:
Basically, can I execute a php script from within a php script? Heres some details: I'm using a remote script to get my local ip address using $HTTP_SERVER_VARS; This works. Now I want to run...
1
by: JimA | last post by:
I have an application that needs to execute dtsrun from a remote machine. Basically I have a batch file on the remote box, which handles the execute. This works fine on a machine with client tools...
6
by: pvadhi07 | last post by:
Hi I am trying to execute a system command in my "C" code running on a Ubuntu Linux machine. The code is supposed to open a secure shell connection to another machine, change directories to a...
5
by: johnny | last post by:
Anyone know how I can make Machine A python script execute a python script on Machine B ?
1
by: ganeshp | last post by:
Hi All, One programming technique to connect from one system to other is through socket programming. Socket programming can be done using programming languages like Java,C,C++. Are there any...
1
shrek123
by: shrek123 | last post by:
Hi, I am in a big mess. I have to execute command on remote machine using perl script. I have used INET Socket module to do this operation. Following is the code snipet. use IO::Socket;
0
by: srinivasan srinivas | last post by:
Hi, My requirement is i have to execute a python script on a remote machine as a subprocess from a python script and to get the subprocess pid of the process running the script. Is there anyway to...
0
by: =?ISO-8859-1?Q?Gerhard_H=E4ring?= | last post by:
srinivasan srinivas wrote: Using os.getpid() you can find out the pid of the script and communicate it back to the caller. -- Gerhard
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
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
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...
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.