mirror of
https://gitlab.com/octtspacc/staticoso
synced 2025-06-05 22:09:23 +02:00
Add local macros
This commit is contained in:
@ -7,14 +7,22 @@
|
||||
| Copyright (C) 2022, OctoSpacc |
|
||||
| ================================= """
|
||||
|
||||
import io
|
||||
import configparser
|
||||
from ast import literal_eval
|
||||
|
||||
def LoadConf(File):
|
||||
def LoadConfFile(File):
|
||||
Conf = configparser.ConfigParser()
|
||||
Conf.optionxform = lambda option: option
|
||||
Conf.read(File)
|
||||
return Conf
|
||||
|
||||
def LoadConfStr(Str):
|
||||
Conf = configparser.ConfigParser()
|
||||
Conf.optionxform = lambda option: option
|
||||
Conf.read_string(Str)
|
||||
return Conf
|
||||
|
||||
def ReadConf(Conf, Sect, Opt=None):
|
||||
if Opt:
|
||||
if Conf.has_option(Sect, Opt):
|
||||
|
Reference in New Issue
Block a user