On Mon, Oct 26, 2009 at 2:59 PM,  <[email protected]> wrote:
>
> Iain, you're probably better off using python's ConfigParser module.
>
> http://docs.python.org/library/configparser.html#module-ConfigParser

I use NicerConfigParser.  It was written as a private class for
loadwsgi (thus the obscure location), but if you want to parse a
config file "just like" Paste does, you'll need to use it.  But if the
default ConfigParser behavior is sufficient for your purpose, you can
use either one.

The main use I've found for it is applications that need multiple
config sections (not just app).  I wish loadwsgi would put the parser
instance into the configuration dict, but it doesn't, so I have to
instantiate the parser separately for it.  Fortunately the
configuration does have a key for the path to the file ('__file__'),
so you don't have to calcuate that yourself.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to