コード例 #1
0
ファイル: main.py プロジェクト: angel-albiach/pineboo
 def __init__(self, xmlobj):
     self._attrs = []
     if xmlobj is not None:
         self.__name__ = xmlobj.tag
         for child in xmlobj:
             if child.tag == "property":
                 key, text = qt3ui.loadProperty(child)
             else:
                 text = aqtt(child.text)
                 key = child.tag
             if isinstance(text, basestring): text = text.strip()
             setattr(self, key, text)
             self._attrs.append(key)
コード例 #2
0
    def __init__(self, xmlobj=None):
        self._attrs = []
        if xmlobj is not None:
            self.__name__ = xmlobj.tag
            for child in xmlobj:
                if child.tag == "property":
                    # Se importa aquí para evitar error de importación cíclica.
                    from pineboolib.qt3ui import loadProperty

                    key, text = loadProperty(child)
                else:
                    text = aqtt(child.text)
                    key = child.tag
                if isinstance(text, str): text = text.strip()
                setattr(self, key, text)
                self._attrs.append(key)
コード例 #3
0
ファイル: utils.py プロジェクト: sbellver/pineboo
    def __init__(self, xmlobj=None):
        self._attrs = []
        if xmlobj is not None:
            self.__name__ = xmlobj.tag
            for child in xmlobj:
                if child.tag == "property":
                    # Se importa aquí para evitar error de importación cíclica.
                    from pineboolib.qt3ui import loadProperty

                    key, text = loadProperty(child)
                else:
                    text = aqtt(child.text)
                    key = child.tag
                if isinstance(text, str): text = text.strip()
                setattr(self, key, text)
                self._attrs.append(key)