From: <mi...@pc...> - 2005-11-05 11:32:11
|
Quoting Rob Cakebread <pyt...@ge...>: > Hello, > > I'm having a problem with values with commas in them. I discovered > list_values=False, which I use to avoid turning values into lists. > That works great: > > c = ConfigObj(config_file, list_values=False) > > The problem is when I write the config file, ConfigObj adds quotes > around values with commas. Should 'list_values=False' turn off that > behavior, or is there another way to avoid having quotes added? > Hello Rob, The problem we currently have is that unquoting (when reading) -with 'list_values=False' - can sometimes do the wrong thing. One answer would be to sitch off quoting/unquoting when 'list_values=False'. This would work for both of us, with the side effect that leading or trailing whitespace in values would be lost when writing. I *could* add an extra option "quote_list_values_off" which defaults to ``False``. An extra option is extra complexity though. As 'list_values=False' will not be used by very many people I think I'd rather just accept (and codument) the side effect. (Unless anyone else speaks up here). I'll implement this for ConfigObj 4.0.2 in the next couple of days. 4.0.1 is available by the way - this fixes the bug in ``walk`` and adds an ``istrue`` section method for fetching boolean values. All the best, Fuzzyman http://www.voidspace.org.uk/python > It wouldn't be a big deal, but I want to include ConfigObj in > an existing app and would have to change a lot of existing > code. > > I really like ConfigObj, great work guys. I'm using it in Planet > Plus[1] with CherryPy to generate web-based forms to edit config.ini's. > > Thanks, > Rob > > [1] http://planetplus.python-hosting.com/ > > > -- > Rob Cakebread > Gentoo Linux Developer > Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x96BA679B > Key fingerprint = 5E1A 57A0 0FA6 939D 3258 8369 81C5 A17B 96BA 679B > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Configobj-develop mailing list > Con...@li... > https://lists.sourceforge.net/lists/listinfo/configobj-develop > |