1# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors 2# Distributed under MIT license, or public domain if desired and 3# recognized in your jurisdiction. 4# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE 5 6from __future__ import print_function 7import glob 8import os.path 9for path in glob.glob('*.json'): 10 text = file(path,'rt').read() 11 target = os.path.splitext(path)[0] + '.expected' 12 if os.path.exists(target): 13 print('skipping:', target) 14 else: 15 print('creating:', target) 16 file(target,'wt').write(text) 17 18