Files
dobin-avred/config.py
T
Dobin Rutishauser f2273315e7 more updates
2022-05-19 07:27:52 +02:00

16 lines
330 B
Python

import json
import os
CONFIG_FILE = os.path.join(os.path.dirname(__file__), "config.json")
class Config(object):
def __init__(self):
self.data = {}
def load(self):
with open(CONFIG_FILE) as jsonfile:
self.data = json.load(jsonfile)
def get(self, value):
return self.data[value]