Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19703

Re: configobj

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <andrea.crotti.0@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'happily': 0.07; 'terry': 0.07; 'least)': 0.09; 'anyway': 0.09; 'am,': 0.12; 'cc:addr :python-list': 0.15; 'looked': 0.15; 'reedy': 0.16; 'yaml': 0.16; 'wrote:': 0.16; 'meant': 0.17; '(which': 0.19; 'trying': 0.20; 'cc:no real name:2**0': 0.21; "doesn't": 0.22; 'header:In-Reply- To:1': 0.22; 'cc:2**0': 0.25; 'somewhere': 0.25; "i'm": 0.27; 'asking': 0.27; 'lists': 0.28; 'cc:addr:python.org': 0.29; 'modules,': 0.30; 'solved': 0.30; 'strings,': 0.30; 'value.': 0.32; 'does': 0.32; 'received:209.85.214': 0.32; 'message- id:@gmail.com': 0.33; 'header:User-Agent:1': 0.33; 'declared': 0.34; 'file': 0.35; '(to': 0.36; 'else,': 0.36; 'but': 0.37; 'options': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'couple': 0.38; 'problems': 0.38; 'think': 0.38; 'either': 0.39; 'received:209': 0.39; 'raw': 0.39; 'subject:: ': 0.39; 'more': 0.61; 'skip:w 40': 0.67; 'validation': 0.73; 'liked': 0.80; '12:21': 0.84; 'andrea': 0.84; 'look.': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=GQLEoR3uT/5W6tjv5CHlV7EKbbcQTUQa+ib4sj71KAQ=; b=HKEOBOLQ5D4USXlTIxWrxn7/5SrcG9O/jTylyJpdQu2iAsMVsbK0iAjoVOiR5WXcgQ /onMwbeGrTH7Ww86WaxIF79JGwsQ3dwbozsCXjrEqP0rZf7RLyUlnsfW9sONy/FWItOz EvHAvw1pWhWk/h/CguZLU7VZm6P3NHV/WIriE=
Date Wed, 01 Feb 2012 10:34:23 +0000
From Andrea Crotti <andrea.crotti.0@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111224 Thunderbird/9.0.1
MIME-Version 1.0
To Terry Reedy <tjreedy@udel.edu>
Subject Re: configobj
References <4F281178.70508@gmail.com> <jga0hq$vc4$1@dough.gmane.org>
In-Reply-To <jga0hq$vc4$1@dough.gmane.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5296.1328092468.27778.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328092468 news.xs4all.nl 6878 [2001:888:2000:d::a6]:58466
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19703

Show key headers only | View raw


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 look. Is
> www.voidspace.org.uk/python/configobj.html
> what you mean?

Yes I meant that sorry.

>
>> which looked less complete and more cumbersome (to me at least)
>
> Does ConfigParser have the same problems you found with ConfigObj.
>

Well no, but also because it just gets raw strings, and doesn't do any 
validation.
With ConfigObj I can do simply a spec file

skip_pesky_pyc_paths = string_list
include_extra_paths = string_list
use_real_dependencies = bool(default=False)
compute_dependencies_recursively = bool(default=False)

And the options which are not declared will default automatically to 
that value.
And also I never really liked the ConfigParser API..

Anyway I solved just leaving these long lists somewhere else, but otherwise
I think a better solution would be YAML in general (which doesn't have 
much validation either
apparently).

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: configobj Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-01 10:34 +0000

csiph-web