Building on Chris's answer, you can get the path of the INI file easily in normal situations by checking global_config['__file__'] in your typical def main(global_config, **settings) signature.
On Thu, Jan 17, 2013 at 11:11 AM, Chris McDonough <[email protected]> wrote: > On Thu, 2013-01-17 at 09:04 -0800, Wyatt Baldwin wrote: > > On Thursday, January 17, 2013 3:25:15 AM UTC-8, Andreas Jung wrote: > > I added some extra app specific sections to the ini file of > > my Pyramid application. How can I get hold of the settings > > from within my app (pyramid.config)? > > > > Pyramid doesn't automatically parse settings. You can use the > > `pyramid.paster.get_appsettings(config_uri, name=None)` function to > > get at them. > > > > Reference: > > > http://docs.pylonsproject.org/projects/pyramid/en/latest/api/paster.html#pyramid.paster.get_appsettings > > > Fraid all the answers I've seen so far are incorrect. > > Pyramid doesn't know beans about sections other than the "app" secrion > in the config file. You'll need to use ConfigParser to parse the config > file again within your app. > > - c > > > > -- > 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. > > -- 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.
