16 lines
346 B
Python
16 lines
346 B
Python
import configparser
|
|
|
|
def load(filename):
|
|
"""Populate the config variables"""
|
|
global port, ssl, url_prefix
|
|
global site_name
|
|
|
|
config = configparser.ConfigParser()
|
|
config.read(filename)
|
|
|
|
port = int(config['server']['port'])
|
|
ssl = bool(config['server']['ssl'])
|
|
url_prefix = config['server']['url_prefix']
|
|
|
|
site_name = config['site']['name']
|