import ast
import re
-with open('../output/raw_out.txt', 'r') as data:
- d = data.readline()
- d = re.sub('\)\]}$', '}',
- re.sub('\)\],', ',',
- re.sub('\[Field\(\'.*?\', ', '', d)))
- print d
- d = ast.literal_eval(d)
+def main():
+ with open('../output/raw_out.txt', 'r') as data:
+ d = data.readline()
+ d = re.sub('\)\]}$', '}',
+ re.sub('\)\],', ',',
+ re.sub('\[Field\(\'.*?\', ', '', d)))
+ d = ast.literal_eval(d)
+ pprint.pprint(d)
-pprint.pprint(d)
+if __name__ == '__main__':
+ main()