[ConfigParser] value with ; and the value blank

Larry Bates larry.bates at websafe.com
Fri May 5 19:18:53 CEST 2006

kai wrote:
> Hello,
> how can I use/save/read values with ";" (start comment) and the value
> blank?
> When I write (set) my config file often the part behind the ";"
> disappears.
> e.g.
> myKey = startMyValue     ;      endMyValue
> Thank's for your hints, Kai
No, but you can write it as:


or use any other separator (~,:, etc.)


or you could do something like:


To do what you ask you would have to write something
custom (not recommended unless you don't control the
format of the file).

-Larry Bates

More information about the Python-list mailing list