Пример #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
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