Passing arguments to & executing, a python script on a remote machine from a python script on local machine

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Sep 20 00:27:14 EDT 2012


On Wed, 19 Sep 2012 12:46:33 -0700, ashish wrote:

> Hi PyTutor Folks
> 
> Here is my situation
> 
> 1. I have two machines. Lets call them local & remote. Both run ubuntu &
> both have python installed
> 
> 2. I have a python script, local.py, running on local which needs to
> pass arguments ( 3/4 string arguments, containing whitespaces like
> spaces, etc ) to a python script, remote.py running on remote (the
> remote machine).

If 3/4 of the arguments are strings, what sort of objects are the other 
1/4?


> I have the following questions:
> 
> 1. What's the best way to accomplish my task ? 

Use a dedicated remote procedure call library. Do not try to invent your 
own. The wheel has already been invented, you are just wasting your time.

I've used both Pyro and Rpyc, either of them seem perfectly reasonable. 
There are many others, but frankly I don't think there is a "best of 
breed" that stands far ahead of the rest.



-- 
Steven



More information about the Python-list mailing list