mirror of https://github.com/Mikaela/Limnoria.git
Different way of output.
This commit is contained in:
parent
15e7c8915e
commit
69fbcea49d
|
@ -23,14 +23,13 @@ def getText(filename):
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
os.mkdir('strings')
|
out = file('strings.txt', 'w')
|
||||||
for filename in sys.argv[1:]:
|
for filename in sys.argv[1:]:
|
||||||
s = getText(filename)
|
s = getText(filename)
|
||||||
node = parser.ast2list(parser.suite(s), True)
|
node = parser.ast2list(parser.suite(s), True)
|
||||||
fd = file(os.path.join('strings', os.path.basename(filename)), 'w')
|
|
||||||
for (lineno, string) in strings(node):
|
for (lineno, string) in strings(node):
|
||||||
fd.write('%s: %s\n' % (lineno, string))
|
out.write('%s: %s: %s\n' % (filename, lineno, string))
|
||||||
fd.close()
|
out.close()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Loading…
Reference in New Issue