[SciPy-user] Help on client-server mode. (OT?)

Andrea Riciputi ariciputi at pito.com
Fri Nov 7 10:35:03 EST 2003


It seems interesting, I'll give it a try. But as far as I can 
understand I must have Python installed on both side (server and 
client) in order to get it to work. Is it possible to get the same 
result (obviously not using Pyro) without Python on the server side?? 
(Well... I think not.)

Thanks,
	Andrea.

On Friday, Nov 7, 2003, at 14:19 Europe/Rome, John Hunter wrote:

> You may want to look at Pyro which allows remote communication of
> objects.  It's a very nice package.
>
>   http://pyro.sourceforge.net
>
> Here's a simple example.  'mother' is the hostname of the remote
> number cruncher and I'm using port 2358 to communicate
>
> Server side
>
>     import sys
>     from Pyro.ext import remote_nons
>
>     class RemoteCruncher:
>         def get_shape(self, a):
>             return a.shape
>
>     remote_nons.provide_server_object(
>         RemoteCruncher(), 'RemoteCruncher', 'mother', 2358)
>
>     print 'Waiting for requests.'
>     sys.exit(remote_nons.handle_requests())
>
> Client side
>
>     from Pyro.ext import remote_nons
>     from Numeric import array
>
>     o = remote_nons.get_server_object('RemoteCruncher', 'mother', 2358)
>
>     a = array([1,2,3])
>     print o.get_shape(a)
>
> Hope this helps!
>
> JDH
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user
>
>
---
Andrea Riciputi

"Science is like sex: sometimes something useful comes out,
   but that is not the reason we are doing it" -- (Richard Feynman)


---
Andrea Riciputi

"Science is like sex: sometimes something useful comes out,
   but that is not the reason we are doing it" -- (Richard Feynman)



More information about the SciPy-User mailing list