sashang> Then the client code can get the value of i like this:
sashang> c = xmlrpclib.ServerProxy("address")
sashang> c.geti()
sashang> but why can't I get the value of i like this?
sashang> c.i
"RPC" stands for "Remote Procedure Call". You're looking for a remote
object a
[EMAIL PROTECTED] wrote:
> but why can't I get the value of i like this?
>
> c.i
>
> How can I implement such behaviour?
Not supported by XMLRpc. Switch to Pyro: http://pyro.sourceforge.net
--Irmen
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Then the client code can get the value of i like this:
> c = xmlrpclib.ServerProxy("address")
> c.geti()
>
> but why can't I get the value of i like this?
>
> c.i
you can't. the XML-RPC protocol only supports method calls, not
attribute accesses.
> How can I imple
Just to make things clearer the problem I have is if I do this:
c = xmlrpclib.ServerProxy("http://somewhere";)
c.i
I get this error:
So how do I fake things so that xmlrpc knows not to try and call i but
gets the value of i instead?
--
http://mail.python.org/mailman/listinfo/python-list
Hi
Say I have a class like the following
class Test:
i = 1
def geti(self):
return self.i
And I use it in an xml-rpc server like this:
t = Test()
s.register_instance(t)
Then the client code can get the value of i like this:
c = xmlrpclib.ServerProxy("address")
c.geti()
but why can't I