On 03/21/2012 11:40 AM, Diez B. Roggisch wrote:
Andrea Crotti writes:
It works - so why do you bother? And I'm not sure about the above code -
AFAIK, validation is a two-step thing:
http://www.voidspace.org.uk/python/articles/configobj.shtml#validation
Diez
I don't agree, if you write code
Andrea Crotti writes:
> On 03/19/2012 12:59 PM, Andrea Crotti wrote:
>> I seemed to remember that type validation and type conversion worked
>> out of the box, but now
>> I can't get it working anymore.
>>
>> Shouldn't this simple example actually fail the parsing (instead it
>> parses perfectly
On 03/19/2012 12:59 PM, Andrea Crotti wrote:
I seemed to remember that type validation and type conversion worked
out of the box, but now
I can't get it working anymore.
Shouldn't this simple example actually fail the parsing (instead it
parses perfectly port to a string)?
sample.py:
from co
On 02/01/2012 12:21 AM, Terry Reedy wrote:
On 1/31/2012 11:06 AM, Andrea Crotti wrote:
I have a couple of questions about configobj, which I'm happily trying
to use for this project.
When asking about 3rd party modules, please include a url, so we can
be sure of what you mean and even take a
On 1/31/2012 11:06 AM, Andrea Crotti wrote:
I have a couple of questions about configobj, which I'm happily trying
to use for this project.
When asking about 3rd party modules, please include a url, so we can be
sure of what you mean and even take a look. Is
www.voidspace.org.uk/python/config
On 14:25, martedì 03 giugno 2008 Roopesh wrote:
> This error is because of the presence of \', \", \n etc.
>
> I had to do the following to make it work.
> address[i].replace("\'",'').replace('\"','').replace('\n','')
>
it's rather ugly :)
I suggest use re module as follow:
import re
address[i]
Bruce wrote:
> I assume that you know the module configobj. I use it like this:
> I have a config_file :
>
> [sec1]
> [[subsec1]]
> a = 1
> b = 2
> [[subsec2]]
> a = 3
> b = 1
>
> .. ans so on
>
> Then in the code I have c = configobj.ConfigObj(path_to_config file)
>
> then I go like for instan