23 lines
502 B
Python
23 lines
502 B
Python
"""
|
|
=================================
|
|
Author: Flora Chen
|
|
Time: 2020/3/17 21:15
|
|
-_- -_- -_- -_- -_- -_- -_- -_-
|
|
=================================
|
|
"""
|
|
import os
|
|
from configparser import ConfigParser
|
|
|
|
|
|
class HandleConfig(ConfigParser):
|
|
"""
|
|
配置文件解析器类的封装
|
|
"""
|
|
def __init__(self, filename):
|
|
super().__init__()
|
|
self.read(filename, encoding='utf-8')
|
|
|
|
conf = HandleConfig(r'E:\PycharmProject\PythonClassChy\python27Class\unitTest\class04022020\config.ini')
|
|
|
|
|