def __init__(self, path): xml = Path(path) data = getFileLines(xml.read_text()) for line in data: tmp = self.getFileVar(line) if tmp != None: self.availableFont.append(tmp)
def __init__(self, path): xml = Path(path) data = getFileLines(xml.read_text()) for line in data: tmp = self.getStyleVar(line) if tmp != None: self.styles.append(tmp) tmp = self.getFontResourceVar(line) if tmp != None: self.usedFont.append(tmp)
def __init__(self, path): count = 1 lang_file = Path(path) data = getFileLines(lang_file.read_text()) for line in data: langSet = {"line": '', "lineNo": 0, "langString": ''} tmp = self.getLangStrings(line) if tmp != "NULL": langSet.__setitem__('line', line) langSet.__setitem__('lineNo', count) langSet.__setitem__('langString', tmp) self.langStrings.append(langSet) count += 1
def loadCPP(self, path): xml = Path(path) data = getFileLines(xml.read_text()) count = 1 for line in data: tmp = self.getVarFromCPP(line) if tmp != None: info = {} info.__setitem__('lineNo', count) info.__setitem__('line', line) info.__setitem__('varName', tmp) self.cppVars.append(info) count += 1
def loadXML(self, path): xmlFile = Path(path) data = getFileLines(xmlFile.read_text()) self.gatherLangStrings(data) pageDataItem = {} pageDataItem.__setitem__('file', xmlFile.__str__()) lines = [] for line in data: lines.append(line) pageDataItem.__setitem__('lines', lines) self.pageData.append(pageDataItem)
def loadXML(self, path): xml = Path(path) data = getFileLines(xml.read_text()) count = 1 for line in data: tmp = self.getVarStrings(line) if tmp != None: info = {} info.__setitem__('lineNo', count) info.__setitem__('line', line) info.__setitem__('varName', tmp) self.xmlVars.append(info) tmp = self.getFileVar(line) if tmp != None: info = {} info.__setitem__('lineNo', count) info.__setitem__('line', line) info.__setitem__('varName', tmp) self.fileVars.append(info) count += 1
def posInc(arr, value): tmp = [] for item in arr: val = getPosValue(item) tmp.append(setPosValue(item, val + value)) return tmp #x = Xmlres('./files/base/images.xml') #print(len(x.fileVars)) x = Path('./WorkSpace/SHRPVARS.cpp') y = utils.getFileLines(x.read_text()) b = [] for item in y: if item.find("//") == -1 and item.find('mConst->SetValue("r') != -1: b.append(item) rPos = [] rndPos = [] revPos = [] for item in b: if 'mConst->SetValue("rndPos' in item: rndPos.append(item) if 'mConst->SetValue("rPos' in item: rPos.append(item) if 'mConst->SetValue("revPos' in item:
def getSubscribersFromFile(filename): subscriberList = getFileLines(filename, removeEOL=True) return subscriberList
def loadXML(self, path, dummy): xmlFile = Path(path) self.pageLine = getFileLines(xmlFile.read_text())