Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
52
def
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
58
if
__name__ ==
'__main__'
:
59
main(sys.argv[1])
Callers
1
recipe-579019.py
File · 0.70
Calls
6
ast2xml
Class · 0.70
prettify
Function · 0.70
open
Function · 0.50
parse
Method · 0.45
read
Method · 0.45
convert
Method · 0.45
Tested by
no test coverage detected