[Python-il] remote execution of python code
meir at mksoft.co.il
Thu Jul 22 10:12:34 IDT 2010
On Thursday 22 July 2010 09:47:35 Amit Dor-Shifer wrote:
> I wish to execute some python code on a remote host, accessed via SSH.
> The module containing the code is available locally, but not on the
> remote host. I can copy the code over to the remote host, and execute it
> there, but I was wondering whether there's some programmatic alternative
> to that: E.G:
> 1. wrap the code in a method,
> 2. extract the method via an object's __dict__
> 3. Serialize the method over to the remote host
> 4. execute result on a remote python interpreter.
> 1. Somehow retrieve the source lines of the method.
> 2. pass those to a remote "python -c" execution.
> Are such options available in python?
How about Pyro:
It has an option for mobile code (both ways):
More information about the Python-il