RPCXML hide implementation.

x_O Sebastian.Pawlus at gmail.com
Tue Aug 26 06:40:28 EDT 2008


Hi

I'm working recently with XMLRPC for python and It never was so easy.

But I've meet a obstacle. Because python is not giving us any
reasonable encapsulation mechanism, I have problems with hiding  some
part of the implementation.

When class has 2 methods and I want to make rpc private only ONE of
them. I can always use __name. But what in case when I really need to
use those two methods inside other class as a public, but not by RPC

Simple  code:
class RpcClass:
  def one(self): #visible by RPC, available as public for other class
        return "one"
  def two(self): #INVISIBLE by RPC, available as public for other
class
        return "two"

Server.register_instance(RpcClass())

Thanks



More information about the Python-list mailing list