From c1803a7603135e2c148d89d5e05596f5d251842a Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 31 Jan 2018 18:27:58 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cgi-bin/config.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cgi-bin/config.py (limited to 'cgi-bin/config.py') diff --git a/cgi-bin/config.py b/cgi-bin/config.py new file mode 100644 index 0000000..f9ee2f6 --- /dev/null +++ b/cgi-bin/config.py @@ -0,0 +1,13 @@ +# parse config.ini +# -*- coding: utf-8 -*- +import configparser, codecs, sys + +conf = configparser.ConfigParser() +conf.read("config.ini") + +class Config(object): + @classmethod + def get(cls, section, option): + return conf.get(section, option) + + -- cgit v1.1-26-g67d0