Пример #1
0
    def __init__(self):
        path = os.path.abspath(os.path.dirname(__file__))

        self.char = Chars()
        signature = {
            'call': ['name', 'method', 'url'],
            'response': ['element', 'attribute']
        }
        self.api, unused = xml_utils.xml2dict(path + '/../config/api.xml',
                                              signature)
Пример #2
0
  def __init__(self, scheme, host, port):
    self.request_response_info = {}
    signature = {'call' : ['name', 'method', 'url'], 'response' : ['element', 'attribute']}

    self.HTTP = HTTP()
    self.res = Reserved()
    self.chars = Chars()

    path_home = os.path.abspath(os.path.abspath(os.path.dirname(__file__)) + \
                  self.chars.slash + self.chars.period + self.chars.period)

    self.empty_string = ''
    self.wd = self.chars.slash.join(__file__.split(self.chars.slash)[0:-2])
    self.api, unused = xml_utils.xml2dict(path_home + '/config/api.xml', signature)
    self.url = Url(scheme, host, port)
Пример #3
0
    def __init__(self, scheme, host, port):
        self.request_response_info = {}
        signature = {
            'call': ['name', 'method', 'url'],
            'response': ['element', 'attribute']
        }

        self.HTTP = HTTP()
        self.res = Reserved()
        self.chars = Chars()

        path_home = os.path.abspath(os.path.abspath(os.path.dirname(__file__)) + \
                      self.chars.slash + self.chars.period + self.chars.period)

        self.empty_string = ''
        self.wd = self.chars.slash.join(__file__.split(self.chars.slash)[0:-2])
        self.api, unused = xml_utils.xml2dict(path_home + '/config/api.xml',
                                              signature)
        self.url = Url(scheme, host, port)
Пример #4
0
  def __init__(self):
    path = os.path.abspath(os.path.dirname(__file__))

    self.char = Chars()
    signature = {'call' : ['name', 'method', 'url'], 'response' : ['element', 'attribute']}
    self.api, unused  = xml_utils.xml2dict(path + '/../config/api.xml', signature)