MCPcopy Create free account
hub / github.com/IENT/YUView / ContainerTable

Class ContainerTable

tools/standardTextToCode/parseTables.py:259–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

257 return tableIndex
258
259class ContainerTable(Container):
260 def __init__(self):
261 super().__init__(None)
262 def parseContainer(self, table, variableDescriptions):
263 self.parseHeader(table.cell(0, 0).text)
264 t1 = table.cell(0, 1).text.strip()
265 t2 = table.cell(0, 2).text.strip()
266 if (t2 == t1):
267 self.parseChildren(table, 3, variableDescriptions)
268 else:
269 self.parseChildren(table, 2, variableDescriptions)
270 def parseHeader(self, header):
271 header = header.replace(u'\xa0', u' ')
272 bracketOpen = header.find("(")
273 bracketClose = header.find(")")
274 self.name = header[:bracketOpen]
275 self.arguments = []
276 for a in header[bracketOpen+1 : bracketClose].split(","):
277 self.arguments.append(a.strip())
278 print(f"Table: {self.name}")
279
280class ContainerIf(Container):
281 def __init__(self, parent):

Callers 1

parseDocumentTablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected