def call(self, func, *args, **kwargs): s = CommandParse.call_dumps(func, *args, **kwargs) self.push(s)
def call_obj_func(self, info): func, p = CommandParse.parse_call(info) self._call_func(func, *p["tuple"], **p["dict"])
def call_obj_func(self, info): func, p = CommandParse.parse_call(info) self._call_func(func, *p['tuple'], **p['dict'])
flag_helper = list(zip(flags, helps, codes)) for flag, helper, codelist in flag_helper: parts = flag.split(' ') flag = parts[0] flag_params = None if len(parts) > 1: flag_params = parts[1:] #flag, flag_params, short, help tmp_section.insertFlag(flag, flag_params, helper, codelist) dd = Document2Section(sys.argv[1]) with open('iqtree.inputs.xml', 'w') as f: macros = doc.createElement('macros') xml_inp = doc.createElement('xml') xml_inp.setAttribute('name', 'inputs') xml_inp.appendChild(dd.inputs) macros.appendChild(xml_inp) print(macros.toprettyxml(), file=f) f.close() CommandParse("iqtree", dd.inputs, exclude_map, "iqtree.command.xml")