|
From: Jorge V. <jor...@gm...> - 2006-08-05 21:58:43
|
bah I'm so stupid.... I forgot setuptools takes eggs before files, so my
code was actually calling the official release.
this patch works.
by the way I think you can delete DEFAULT_INDENT_TYPE and set it inside the
OPTION_DEFAULTS that will solve the readonly NOTE from the __all__
again great work keep it up.
PS: if I should post this to somewhere please say so.
On 8/5/06, Jorge Vargas <jor...@gm...> wrote:
>
> Hi
>
> I don't know why but I wanted 2 indent spaces, 0 seems too flew and 4 too
> much so I went into the code and saw it was simple so I gave it a try. But
> it seems I'm missing something.
>
> here is the traceback for creating an object with my patch i believe it
> has something to do with your subclass of dict
>
> Traceback (most recent call last):
> File "configObjTest.py", line 5, in ?
> config = ConfigObj('file',indent_type='
> ',raise_errors=True,indent_size=4)
> File "C:\Python24\lib\site-packages\configobj.py", line 984, in __init__
>
> # keyword arguments take precedence over an options dictionary
> TypeError: Unrecognised option "indent_size".
>
>
>
> it's failing here which doesn't makes sence to me since.
> >>> o={}
> >>> o.update({'2':2})
> >>> o
> {'2': 2}
>
> def __init__(self, infile=None, options=None, **kwargs):
> """
> Parse or create a config file object.
>
> ``ConfigObj(infile=None, options=None, **kwargs)``
> """
> if infile is None:
> infile = []
> if options is None:
> options = {}
> else:
> options = dict(options)
> # keyword arguments take precedence over an options dictionary
> options.update(kwargs)
>
>
> it's a small indeed :)
>
>
|