[ConfigParser] value with ; and the value blank

K

kai

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
 
L

Larry Bates

kai said:
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:

mykey=startMyValue,endMyValure

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

mykey=startMyValue~endMyValue

or you could do something like:

startvalue=startMyValue
endvalue=endMyValue

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top