bundlewrap/libs/ini.py
mwiegand 33320a7c8c wip
2021-06-30 02:25:15 +02:00

18 lines
338 B
Python

from configparser import ConfigParser
class Writable():
data = ''
def write(self, line):
self.data += line
def dumps(dict):
config = ConfigParser()
for section, settings in dict.items():
config[section] = settings
writable = Writable()
config.write(writable)
return writable.data