Exemplo n.º 1
0
 def __init__(self, template, template_directory, args):
     Server.__init__(self)
     self.template = template
     self.variables = []
     self.event_dict = {}
     # 首先解析XML
     self.parse()
Exemplo n.º 2
0
    def __init__(self, address, server_name='systec_ua'):
        Server.__init__(self)
        base.UaBase.__init__(self)

        logging.basicConfig(level=logging.INFO, format='[%(asctime)s][%(levelname)s][%(threadName)-15s] %(message)s')

        self.set_endpoint(address)
        self.set_server_name(server_name)

        # setup our own namespace, not really necessary but should as spec
        self.uri = "http://systec.fe.up.pu"
        self.register_namespace(self.uri)

        self.root = self.get_root_node()

        self.lock = threading.Lock()
        self.client_dictionary = dict()

        self.start()