Re: mirroring object attributes using xml-rpc

2006-07-06 Thread skip
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

Re: mirroring object attributes using xml-rpc

2006-07-05 Thread Irmen de Jong
[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

Re: mirroring object attributes using xml-rpc

2006-07-05 Thread Fredrik Lundh
[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

Re: mirroring object attributes using xml-rpc

2006-07-05 Thread sashang
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

mirroring object attributes using xml-rpc

2006-07-05 Thread sashang
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