browsewindow.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def parseDomainManager (self):
        identifier = self.addTreeWidgetItem(self.domMgrItem, 'Identifier:', self.domManager._get_identifier())
        profile = self.addTreeWidgetItem(self.domMgrItem, 'Profile:', self.domManager._get_domainManagerProfile())
        self.domMgrPropsItem = self.addTreeWidgetItem(self.domMgrItem, 'Properties')

        # Read the DMD file to get the SPD file, which can then be used to get the properties.
        _xmlFile = self.fileMgr.open(str(self.domManager._get_domainManagerProfile()), True)
        dmd = minidom.parseString(_xmlFile.read(_xmlFile.sizeOf()))      
        _xmlFile.close()
        spdFile = dmd.getElementsByTagName('localfile')[0].getAttribute('name')
        if not spdFile.startswith("/"):
            spdFile = os.path.join(os.path.dirname(xmlfile), spdFile)

        # Get the property name mapping.
        prfFile = getPropertyFile(spdFile, self.fileMgr)
        self.domMgrProps = parsePropertyFile(prfFile, self.fileMgr)

        # Create entries for all of the properties.
        try:
            props = self.domManager.query([])
        except:
            props = []
        self.buildPropertiesListView_old(self.domMgrPropsItem, props, self.domMgrProps)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号