local interpreter remote machines

Irmen de Jong irmen at -NOSPAM-REMOVETHIS-xs4all.nl
Mon Jan 5 17:27:04 EST 2004


hokieghal99 wrote:

> This may not be possible, but I thought I'd ask anyway. Could I get the 
> below code to run on a Python server where other machines would connect 
> to it (say thru the Web) and get details of *their* system instead of 
> the system details of the machine that the interpreter is running on? 
> Any ideas?

If you also have Python running on the other machine,
you can do this very easily with Pyro: http://pyro.sourceforge.net
(no network programming necessary at all).

Essentially you create an object on the remote machine that contains
a method with the code you want to execute, and you call that object
-using Pyro- as if it was located on your own computer.

But this only works if you have a supported Python version running
on the remote machine, and that you are allowed to connect to that
machine over the network.

You can even create some python code on your local machine, and
actually submit that to the other machine, let it deal with it,
and then get the results back.
But only do this if you know that no unauthorised user can do this,
because this is a security risk.

--Irmen de Jong.



More information about the Python-list mailing list