You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
414 B

  1. import json
  2. import munch
  3. import os
  4. path = os.path.dirname(__file__)
  5. with open(os.path.join(path,'defaults.json')) as d,open(os.path.join(path,'keycodes.json')) as k:
  6. defaults = munch.munchify(json.load(d))
  7. keycodes = munch.munchify(json.load(k))
  8. for key,value in defaults['local'].items():
  9. defaults['local'][key] = os.path.expandvars(value)
  10. loaded = munch.Munch(defaults = defaults,keycodes = keycodes)