config.py 199 B

123456789
  1. import hjson
  2. class Config:
  3. def __init__(self, filename):
  4. with open(filename, 'r') as f:
  5. self.config = hjson.load(f)
  6. def __getattr__(self, name):
  7. return self.config[name]