2014-11-20 13:30:47 +08:00
|
|
|
from __future__ import print_function
|
2007-06-15 05:01:26 +08:00
|
|
|
import glob
|
|
|
|
import os.path
|
2015-01-25 05:29:52 +08:00
|
|
|
for path in glob.glob('*.json'):
|
2007-06-15 05:01:26 +08:00
|
|
|
text = file(path,'rt').read()
|
|
|
|
target = os.path.splitext(path)[0] + '.expected'
|
2015-01-25 05:29:52 +08:00
|
|
|
if os.path.exists(target):
|
2014-11-20 13:30:47 +08:00
|
|
|
print('skipping:', target)
|
2007-06-15 05:01:26 +08:00
|
|
|
else:
|
2014-11-20 13:30:47 +08:00
|
|
|
print('creating:', target)
|
2007-06-15 05:01:26 +08:00
|
|
|
file(target,'wt').write(text)
|
|
|
|
|