1 from __future__
import absolute_import
2 from __future__
import print_function
6 # a simple script to distribute pieces of catalog to simulation directories
8 simulations_path
= osp
.abspath('fdds/simulations')
9 catalog_path
= osp
.join(simulations_path
,'catalog.json')
10 print('reading %s' % catalog_path
)
11 catalog
= json
.load(open(catalog_path
,'r'))
14 local_catalog_path
= osp
.join(simulations_path
,sim
,'catalog.json')
15 print('writing %s' % local_catalog_path
)
16 json
.dump({sim
: catalog
[sim
]},open(local_catalog_path
,'w'),indent
=4, separators
=(',', ': '))