>>>>> Jelle Smet <je...@smetj.net> (JS) wrote:

One more thing:

>JS> I start python interactively:
>>>>> import xmlrpclib
>>>>> session1=xmlrpclib.ServerProxy('http://localhost:8000')
>>>>> session2=xmlrpclib.ServerProxy('http://localhost:8000')
>>>>> print session1.show_random()
>JS> 13930
>>>>> print session2.show_random()
>JS> 13930
>>>>> 

I get the impression, also from your use of the variable names
'session1' and 'session2' that xmlrpclib.ServerProxy() gives you some
kind of connection to the XMLRPC server. This is not the case. It gives
just an administration object *in the client* that will communicate with
the server when you call a method on it. The two session's in your code
are therefore functionally equivalent and there is no advantage in
having two of them instead of one. And the name session is misleading.

Please note also that XMLRPC isn't object-oriented. There is just the
server; in the protocol there are no objects other than the server.
-- 
Piet van Oostrum <p...@cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to