Christopher Dunn | f986423 | 2007-06-14 21:01:26 +0000 | [diff] [blame^] | 1 | import glob |
2 | import os.path | ||||
3 | for path in glob.glob( '*.json' ): | ||||
4 | text = file(path,'rt').read() | ||||
5 | target = os.path.splitext(path)[0] + '.expected' | ||||
6 | if os.path.exists( target ): | ||||
7 | print 'skipping:', target | ||||
8 | else: | ||||
9 | print 'creating:', target | ||||
10 | file(target,'wt').write(text) | ||||
11 |