py2.4 fix - thresh

This commit is contained in:
Marcos Pinto 2008-01-03 00:57:36 +00:00
commit 9a3a96a31f

View file

@ -16,14 +16,14 @@ for template_dir in template_dirs:
all_strings = [] all_strings = []
for filename in files: for filename in files:
with open(filename,'r') as f: f = open(filename,'r')
content = f.read() content = f.read()
all_strings += re.findall("_\(\"(.*?)\"\)",content) all_strings += re.findall("_\(\"(.*?)\"\)",content)
all_strings += re.findall("_\(\'(.*?)\'\)",content) all_strings += re.findall("_\(\'(.*?)\'\)",content)
all_strings = sorted(set(all_strings)) all_strings = sorted(set(all_strings))
with open ('./template_strings.py','w') as f: f = open ('./template_strings.py','w')
for value in all_strings: for value in all_strings:
f.write("_('%s')\n" % value ) f.write("_('%s')\n" % value )