A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-November/029996.html below:

[Python-Dev] ConfigParser with a single section

[Python-Dev] ConfigParser with a single section [Python-Dev] ConfigParser with a single sectionGuido van Rossum guido@python.org
Fri, 08 Nov 2002 11:55:44 -0500
> Unfortunately I cannot easily supply the section line when parsing the
> config file, even if I use ConfigParser.readfp(); the "obvious solution"
> 
>     prefix = cStringIO.StringIO("[Options]\n")
>     cfp = ConfigParser.ConfigParser()
>     cfp.readfp(prefix, filename)
>     cfp.read(filename)
> 
> doesn't work because the ConfigParser object expects a new section header
> for each read*() call.

So copy everything into one memory buffer.

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4