|
From: Michael F. <fuz...@vo...> - 2006-08-06 21:43:47
|
Jorge Vargas wrote: > 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. Hello Jorge, Thanks for the compliments and the patch Jorge. :-) My main concern with ConfigObj at the moment is that the number of features and options seems to grow with every release. This actually makes it harder for people to use ConfigObj, rather than easier. Although your patch is straightforward, I don't think I can include in the standard package. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > > PS: if I should post this to somewhere please say so. > > On 8/5/06, *Jorge Vargas* < jor...@gm... > <mailto: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 :) > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |