tenfourfox/build/pymake/mkformat.py

14 lines
237 B
Python
Raw Normal View History

2017-04-19 07:56:45 +00:00
#!/usr/bin/env python
import sys
import pymake.parser
filename = sys.argv[1]
source = None
with open(filename, 'rU') as fh:
source = fh.read()
statements = pymake.parser.parsestring(source, filename)
print statements.to_source()