473,772 Members | 3,148 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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*********@pyt hon.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.pope n() method to do that. I have done as following:
executable = '/usr/bin/rsh'
args = [executable, hostname, scriptname]
pid = subprocess.pope n(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 2053

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

Similar topics

7
5111
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. I would like my code (which picks a random banner) to execute on the remote site so when I include it a random banner show up.
2
10182
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 a local php script to call the remote script and return my ip address. Any Ideas? Thanks! -bp
1
9222
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 installed. My problem is that I can't install the client tools on the remote box. Does anyone know what I need to install on the remote machine to get this to execute, without installing the client tools? I've tried copying dtsrun.exe and...
6
16343
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 given directory and run an executable on that machine. I have configured the remote machine through ssh keygen to be able to authenticate my account and bypass the password. here is my "C" code: void create_server(char *servermcnm) { char...
5
4421
by: johnny | last post by:
Anyone know how I can make Machine A python script execute a python script on Machine B ?
1
1930
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 other programming techniques though which can be used to 1) Connect from local machine to remote machines AND 2) Transfer data from local machine to remote machines AND 3) Execute a process on the remote machines.
1
5467
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
1129
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 do that?? I have used subprocess.popen() method to do that. I have done as following: executable = '/usr/bin/rsh' args = pid = subprocess.popen(args) It returned the pid of rsh. But i am interested in the pid of the process running the script....
0
368
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
9454
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
10261
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...
1
10038
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
9912
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
8934
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
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
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4007
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
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.