ConfigParser shootout, preliminary entry
From: Michael Chermside (mcherm_at_mcherm.com)
Date: 10/18/04
- Next message: Alex Martelli: "Re: question on list comprehensions"
- Previous message: Roger: "Re: Python in HTAs"
- Next in thread: Tim Daneliuk: "Re: ConfigParser shootout, preliminary entry"
- Reply: Tim Daneliuk: "Re: ConfigParser shootout, preliminary entry"
- Reply: Istvan Albert: "Re: ConfigParser shootout, preliminary entry"
- Reply: Michael Foord: "Re: ConfigParser shootout, preliminary entry"
- Reply: Dan Gass: "Re: ConfigParser shootout, preliminary entry"
- Reply: Dan Gass: "Re: ConfigParser shootout, preliminary entry"
- Reply: Sion Arrowsmith: "Re: ConfigParser shootout, preliminary entry"
- Reply: Paramjit Oberoi: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: David Wilson: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Skip Montanaro: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: David Wilson: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Robert Brewer: "RE: ConfigParser shootout, preliminary entry"
- Maybe reply: Steven Bethard: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Steven Bethard: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Stephen Waterbury: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Skip Montanaro: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Carlos Ribeiro: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Stephen Waterbury: "Re: ConfigParser shootout, preliminary entry"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 17 Oct 2004 15:13:01 -0700 To: python-list@python.org
A few weeks ago, the suggestion was made on Python-Dev that it might be time
to consider replacing the ConfigParser module and that we should hold a
"shootout" (ie ask for implementations and see what we get).
Since then I've been playing around with this... not the parsing part (which
so far I have completely ignored) but the programmer interface. There needs
to be a well-thought-out data model for the information stored, and the user
interface needs to be very easy to use, yet not so "magical" that it becomes
difficult to understand.
I have put together what I think is probably my best proposal. It is based
on a superset of ini config files and java .property files. There is a
convenient access mechanism ("config.my_app.some_value") as well as more
general approaches ("config.values['my_app.serviceByPort.80']"). I have
tried to consider issues like unicode (I permit fairly lenient mixing of
unicode and str), and unit testing ("... call config.clear_all() in the
tearDown() method of any unittests that use the config module..."). I have
even considered carefully what to leave OUT (converting to non-string data
types, interpolating values, things like that).
I think that I am now at the point where I could really use some input from
others. So I'd like to invite people to review my design and send me your
suggestions. I'm not expecting this as a *useful* module yet (it doesn't
yet parse files!), but it seemed like a good stage at which to ask for
feedback. I'm attaching two files, config.py and configTest.py, and they
are also available from these urls:
http://www.mcherm.com/publish/2004-10-17/config.py
http://www.mcherm.com/publish/2004-10-17/configTest.py
Thanks in advance for reviewing this.
-- Michael Chermside
- Next message: Alex Martelli: "Re: question on list comprehensions"
- Previous message: Roger: "Re: Python in HTAs"
- Next in thread: Tim Daneliuk: "Re: ConfigParser shootout, preliminary entry"
- Reply: Tim Daneliuk: "Re: ConfigParser shootout, preliminary entry"
- Reply: Istvan Albert: "Re: ConfigParser shootout, preliminary entry"
- Reply: Michael Foord: "Re: ConfigParser shootout, preliminary entry"
- Reply: Dan Gass: "Re: ConfigParser shootout, preliminary entry"
- Reply: Dan Gass: "Re: ConfigParser shootout, preliminary entry"
- Reply: Sion Arrowsmith: "Re: ConfigParser shootout, preliminary entry"
- Reply: Paramjit Oberoi: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: David Wilson: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Skip Montanaro: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: David Wilson: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Robert Brewer: "RE: ConfigParser shootout, preliminary entry"
- Maybe reply: Steven Bethard: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Steven Bethard: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Stephen Waterbury: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Skip Montanaro: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Carlos Ribeiro: "Re: ConfigParser shootout, preliminary entry"
- Maybe reply: Stephen Waterbury: "Re: ConfigParser shootout, preliminary entry"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|