convertValues.py 510 B

1234567891011121314151617181920212223242526
  1. import json
  2. import re
  3. import sys
  4. import os
  5. def main(parameterFile):
  6. fs=os.path.join(os.path.expanduser('~'),'.labkey','setup.json')
  7. with open(fs,'r') as f:
  8. setup=json.load(f)
  9. sys.path.append(setup['paths']['parseConfig'])
  10. import parseConfig
  11. with open(parameterFile,'r') as f:
  12. pars=json.load(f)
  13. pars=parseConfig.convert(pars,setup)
  14. print(pars)
  15. pars=parseConfig.convertValues(pars)
  16. print(pars)
  17. if __name__=='__main__':
  18. main(sys.argv[1])