Alexander Belchenko wrote:
> Michael Foord пишет:
>> bi...@uk... wrote:
>>> Some one has sent you a message via your contact form. They filled
>>> in the
>>> following values :
>>>
>>> comment = We are using ConfigObj in Bazaar project and many bzr
>>> plugins. Recently I discover that your support of inline comments
>>> can create problems with write and then read back string with '#'
>>> sign in it.
>>>
>>> E.g. if I save option from my program, e.g.:
>>>
>>> message = bug #123 fixed
>>>
>>> and then I tru to read back config file, I get only 'bug' as value
>>> of 'message' option.
>>>
>>> It's bad. Any ideas why ConfigObj works in this way?
>>>
>> In order to allow inline comments that aren't part of the value.
>>
>>> Please, don't tell me that we must escape # signs when we write them
>>> to config, and unescape when read back. It's ugly.
>>>
>>
>> You can probably do:
>>
>> message = "bug #123 fixed"
>
> How this possible to do using ConfigObj API?
>
Ah! That's a bug. ConfigObj should put the quotes in for you!
Bugger. That's a fairly serious bug - I wonder why it hasn't been
reported before.
I'll see how quickly I can get that turned round.
Michael
http://www.manning.com/foord
|