# options. The options are set before XML loading as they may affect it. reg = Registry(gen, options) # Parse the specified registry XML into an ElementTree object startTimer(args.time) tree = etree.parse(args.registry) endTimer(args.time, '* Time to make ElementTree =') # Load the XML tree into the registry object startTimer(args.time) reg.loadElementTree(tree) endTimer(args.time, '* Time to parse ElementTree =') if args.validate: reg.validateGroups() if args.dump: logDiag('* Dumping registry to regdump.txt') reg.dumpReg(filehandle=open('regdump.txt', 'w', encoding='utf-8')) # Finally, use the output generator to create the requested target if args.debug: pdb.run('reg.apiGen()') else: startTimer(args.time) reg.apiGen() endTimer(args.time, '* Time to generate ' + options.filename + ' =') if not args.quiet: logDiag('* Generated', options.filename)