Different way of output.

This commit is contained in:
Jeremy Fincher 2004-08-18 22:28:25 +00:00
parent 15e7c8915e
commit 69fbcea49d

View File

@ -23,14 +23,13 @@ def getText(filename):
fd.close()
def main():
os.mkdir('strings')
out = file('strings.txt', 'w')
for filename in sys.argv[1:]:
s = getText(filename)
node = parser.ast2list(parser.suite(s), True)
fd = file(os.path.join('strings', os.path.basename(filename)), 'w')
for (lineno, string) in strings(node):
fd.write('%s: %s\n' % (lineno, string))
fd.close()
out.write('%s: %s: %s\n' % (filename, lineno, string))
out.close()
if __name__ == '__main__':
main()