예제 #1
0
import os
from voidpp_tools.json_config import JSONConfigLoader

config_loader = JSONConfigLoader(os.path.dirname(__file__))

config = config_loader.load('pca9685-driver-http-config.json')
예제 #2
0
import os
from voidpp_tools.json_config import JSONConfigLoader

config_loader = JSONConfigLoader(os.path.dirname(__file__))

config = config_loader.load("rpi-gpio-http-config.json")
예제 #3
0
파일: config.py 프로젝트: voidpp/vcab
import os
import json
from voidpp_tools.json_config import JSONConfigLoader

loader = JSONConfigLoader(__file__)


def load_config():
    return loader.load('vcab-config.json')


def load_absinthe_config():
    absinthe_data_dir = os.path.join(os.path.expanduser('~'), '.absinthe')
    config_data = None
    try:
        with open(os.path.join(absinthe_data_dir, 'config.json')) as f:
            config_data = json.load(f)
        return config_data['server']
    except Exception as e:
        raise
예제 #4
0
import os
from voidpp_tools.json_config import JSONConfigLoader

config_loader = JSONConfigLoader(os.path.dirname(__file__))

config = config_loader.load('rpi-gpio-http-config.json')