Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > How to Machine A python script execute Machine B python script?

Reply
Thread Tools

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

 
 
johnny
Guest
Posts: n/a
 
      07-09-2007
Anyone know how I can make Machine A python script execute a python
script on Machine B ?

 
Reply With Quote
 
 
 
 
Jay Loden
Guest
Posts: n/a
 
      07-09-2007
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 ?
>

 
Reply With Quote
 
 
 
 
half.italian@gmail.com
Guest
Posts: n/a
 
      07-09-2007
On Jul 8, 6:45 pm, johnny <(E-Mail Removed)> wrote:
> Anyone know how I can make Machine A python script execute a python
> script on Machine B ?


xmlrpc will work.

~Sean

 
Reply With Quote
 
Nick Craig-Wood
Guest
Posts: n/a
 
      07-09-2007
http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> wrote:
> On Jul 8, 6:45 pm, johnny <(E-Mail Removed)> wrote:
> > 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 <(E-Mail Removed)> -- http://www.craig-wood.com/nick
 
Reply With Quote
 
vasudevram
Guest
Posts: n/a
 
      07-09-2007
On Jul 9, 1:30 pm, Nick Craig-Wood <(E-Mail Removed)> wrote:
> (E-Mail Removed) <(E-Mail Removed)> wrote:
> > On Jul 8, 6:45 pm, johnny <(E-Mail Removed)> wrote:
> > > 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 <(E-Mail Removed)> --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


 
Reply With Quote
 
Antonio Cuni
Guest
Posts: n/a
 
      07-11-2007
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
 
Reply With Quote
 
 
 
Reply

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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Re: How to execute commands on a windows machine from a Linux machine Andrew Berg Python 0 10-04-2012 06:15 AM
How to execute a script from another script and other script does notdo busy wait. Rajat Python 3 01-08-2010 02:05 PM
RE: How to execute a script from another script and other script doesnotdo busy wait. VYAS ASHISH M-NTB837 Python 2 01-07-2010 08:18 PM
execute a shell script from a python script spec Python 7 07-18-2006 06:55 PM



Advertisments