blob: cd6495b3336a8dd9cd2339778a31e2062dfa599c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import configparser
import os
_parser = None
def _get_parser():
global _parser
if not _parser:
_parser = configparser.RawConfigParser()
path = os.path.dirname(os.path.realpath(__file__)) + "/../conf/config"
_parser.read(path)
return _parser
def get(section, option):
return _get_parser().get(section, option)
def getboolean(section, option):
return _get_parser().getboolean(section, option)
def getint(section, option):
return _get_parser().getint(section, option)
|