blob: ef9efd7607ddf9f4816486dfe176df0f7dbaee1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
import json
from os import path
import __main__
def load_config(filename):
possible_directories = ['.', path.dirname(__main__.__file__)]
for directory in possible_directories:
if path.exists(path.join(directory, 'config')):
return json.load(
open(path.join(directory, 'config',
filename + '.json')))
|