Wednesday, 11 September 2013

Python ConfiogParser parse from string

Python ConfiogParser parse from string

Usualy, I use ConfigParser to parse a file, however, here I'd like to
parse a string within the content of the config file. Is that possible
with Python ?
string = "[section1]\ntest=value\n"
config = ConfigParser()
config.read(string)
...

No comments:

Post a Comment