← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #226713]: How to create an instance of an inherited class in unittest Python so that I can register the instance of that class in simpleXMLRPCServer

 

Question #226713 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/226713

RaiMan proposed the following answer:
    #self.server.register_instance() #How to Register an instance of XYZ
here.

according to the docs:
http://docs.python.org/2/library/simplexmlrpcserver.html
#simplexmlrpcserver-objects

    self.server.register_instance(XYZ())

which registers all XYZ instance methods as top level functions (only
those that are not yet registered  with register_function())

or
    self.server.register_instance(XYZ(), true)

which allows to have duplicate names in different instances, since the
client has to use dotted names.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.