MCPcopy Create free account
hub / github.com/ActiveState/code / main

Function main

recipes/Python/579019_Python_AST_to_XML/recipe-579019.py:52–56  ·  view source on GitHub ↗
(fpath)

Source from the content-addressed store, hash-verified

50 self.celement = ocelement
51
52def main(fpath):
53 with open(fpath, 'r') as f:
54 tree = ast.parse(f.read())
55 res = ast2xml().convert(tree)
56 print prettify(res)
57
58if __name__ == '__main__':
59 main(sys.argv[1])

Callers 1

recipe-579019.pyFile · 0.70

Calls 6

ast2xmlClass · 0.70
prettifyFunction · 0.70
openFunction · 0.50
parseMethod · 0.45
readMethod · 0.45
convertMethod · 0.45

Tested by

no test coverage detected