On Oct 8, 2008, at 11:28 AM, ashok wrote:

>
> Hi All,
>
> I have a question about flags in development.ini file.  Most of them
> are parsed by paster itself, but what I want to do is create my own
> flag and parse it myself.  For example, I added this to the file:
>
> [mode]
> user_logging = 1
>
> Now I need to parse this in my program, however, I was wondering if
> there is an intrinsic function that I could use to parse the file.
>
> Does any one know of this?

You can add custom vars to the [app:main] section of your config file  
and they'd be available via the pylons.config object -- so you might do:

use_logging = asbool(pylons.config.get('use_logging'))

--
Philip Jenvey



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
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