trying to wrap xmlrpclib into classes
Brian Quinlan
brian at sweetapp.com
Tue Jan 21 11:48:32 EST 2003
> Instantiating my page goes well, but trying to access a method like
> getInfo, which should invoke server.wiki.getPageInfo(name) through my
> server object does not work, for obvious reasons:
>
> self.result = self.server.wiki.getPageInfo(name)
> AttributeError: Server instance has no attribute 'wiki'
>
> 'Somehow', I want this Page object to forward the method invocation to
> my Server object, but I'm stuck on the _how_. Should I let my Server
> class inherit from the xmlrpclib.Server class? My Page class too?
You could make your Server class an xmlrpclib.Server subclass but I
would just get rid of your Server class since it doesn't really do
anything.
Cheers,
Brian
More information about the Python-list
mailing list