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

How to Machine A python script execute Machine B python script?

Anyone know how I can make Machine A python script execute a python
script on Machine B ?

Jul 9 '07 #1
5 4392
If you're running on a UNIX platform, one option would be to use SSH to execute the command remotely. Otherwise, you could also use a client/server setup to have the two scripts communicate across the network and trigger actions etc. It may also be possible to remotely execute an application on Windows using the win32api extensions, but I haven't any idea how you'd go about that. Perhaps others can chime in with detailed information if you let us know what kind of platform you're on and what you're trying to accomplish.

-Jay

johnny wrote:
Anyone know how I can make Machine A python script execute a python
script on Machine B ?
Jul 9 '07 #2
On Jul 8, 6:45 pm, johnny <rampet...@gmail.comwrote:
Anyone know how I can make Machine A python script execute a python
script on Machine B ?
xmlrpc will work.

~Sean

Jul 9 '07 #3
ha**********@gmail.com <ha**********@gmail.comwrote:
On Jul 8, 6:45 pm, johnny <rampet...@gmail.comwrote:
Anyone know how I can make Machine A python script execute a python
script on Machine B ?

xmlrpc will work.
Or pyro

http://pyro.sourceforge.net/

Pyro is short for PYthon Remote Objects. It is an advanced and
powerful Distributed Object Technology system written entirely in
Python, that is designed to be very easy to use. Never worry about
writing network communication code again, when using Pyro you just
write your Python objects like you would normally. With only a few
lines of extra code, Pyro takes care of the network communication
between your objects once you split them over different machines on
the network. All the gory socket programming details are taken care
of, you just call a method on a remote object as if it were a local
object!

--
Nick Craig-Wood <ni**@craig-wood.com-- http://www.craig-wood.com/nick
Jul 9 '07 #4
On Jul 9, 1:30 pm, Nick Craig-Wood <n...@craig-wood.comwrote:
half.ital...@gmail.com <half.ital...@gmail.comwrote:
On Jul 8, 6:45 pm, johnny <rampet...@gmail.comwrote:
Anyone know how I can make Machine A python script execute a python
script on Machine B ?
xmlrpc will work.

Or pyro

http://pyro.sourceforge.net/

Pyro is short for PYthon Remote Objects. It is an advanced and
powerful Distributed Object Technology system written entirely in
Python, that is designed to be very easy to use. Never worry about
writing network communication code again, when using Pyro you just
write your Python objects like you would normally. With only a few
lines of extra code, Pyro takes care of the network communication
between your objects once you split them over different machines on
the network. All the gory socket programming details are taken care
of, you just call a method on a remote object as if it were a local
object!

--
Nick Craig-Wood <n...@craig-wood.com--http://www.craig-wood.com/nick
> xmlrpc will work.
Right. Pretty easy to use. Go to the xml-rpc.com site to read about
it. Python has it included in the standard library, so you don't need
to get anything extra to use XML-RPC. And it works as advertised, more
or less - I recently wrote some simple servers and clients using
Python and XML-RPC.

Or SOAP (Google for "Python SOAP"). But not sure if SOAP is actively
supported for Python nowadays.

Or ICE - see www.zeroc.com. Haven't tried it out yet, but appears
interesting.
But it seems ICE has more overhead to setup (your ICE code, I mean,
not to install the software itself) than XML-RPC or Pyro. (It looks
like a lighter version of CORBA - some of the key people who created
it are ex-CORBA experts). Could possibly give better performance or
have more features, though ...

Also, XML-RPC, SOAP, and ICE are all interoperable with different
languages - meaning your server and client can be in different
languages; at least, XML-RPC and SOAP have support in many languages,
while ICE has it for at least for C++, C#, Java, Python, Ruby, PHP,
and Visual Basic (some of these have only support for clients, when I
last checked).

Vasudev Ram
http://www.dancingbison.com
http://jugad.livejournal.com
http://sourceforge.net/projects/xtopdf
Jul 9 '07 #5
johnny wrote:
Anyone know how I can make Machine A python script execute a python
script on Machine B ?
have a look to py.execnet; in the simplest case, it does not need any
special setup on machine B, just a working ssh server and a python
interpreter installed:

http://codespeak.net/py/dist/execnet.html

ciao Anto
Jul 11 '07 #6

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

Similar topics

2
by: satish | last post by:
Hello all, I have a shared object executable viz. *cable* which I execute as follows : $ ansyscust71 -custom cable -p ANSYSRF **ansyscust71 is a shell script and is a part of a software...
2
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...
8
by: Darren Dale | last post by:
Is there a place to put python programs so I dont have to refer to the absolute path everytime I want to call them? For example: if I am in /home/me and want to execute: python...
2
by: timdoyle05 | last post by:
Hi, I have a question relating to how Unix commands can be issued from Python programs. Im am currently writing a large test script in python and I need this script to call three other separate...
8
by: Paul Cochrane | last post by:
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to...
4
by: pmcgover | last post by:
I enjoyed Paul Barry's September article in Linux Journal entitled, "Web Reporting with MySQL, CSS and Perl". It provides a simple, elegant way to use HTML to display database content without any...
2
by: Jorgen Bodde | last post by:
Hi all, This is slightly OT but it drives me nuts. Whenever I create a shortcut in the start menu (in Windows) of a python script, it will only execute it when the path where the script resides...
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: srinivasan srinivas | last post by:
This is ok. Is there any other way to find it out? Thanks, Srini ----- Original Message ---- From: Gerhard Häring <gh@ghaering.de> To: python-list@python.org Sent: Friday, 20 June, 2008...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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...

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.