Ian Bicking <[EMAIL PROTECTED]> writes:

Chris> Is there a good way to get access to the development.ini
Chris> configuration variables from those files?

Ian> Try using paste.deploy.appconfig('/full/path/to/development.ini')

No joy using PasteDeploy-1.1-py24.egg, Paste-1.1.1-py2.4.egg.  Tried
it, and it wants a scheme:

 pda = 
paste.deploy.appconfig("/Users/chris/Projects/client/customer/er/dev-sqlite.ini")

 LookupError: URI has no scheme:
 '/Users/chris/Projects/client/customer/er/dev-sqlite.ini'

If I prefix with "file:" it doesn't recognize 'file':

 pda = 
paste.deploy.appconfig("file:/Users/chris/Projects/client/customer/er/dev-sqlite.ini")

 LookupError: URI scheme not known: 'file' (from egg, config)

Looks like it wants a scheme of 'config' and I try that but it looks
like it can't find it tho the path is right:

 pda = 
paste.deploy.appconfig("config:/Users/chris/Projects/client/customer/er/dev-sqlite.ini")
 ---------------------------------------------------------------------------
 pkg_resources.DistributionNotFound                      Traceback (most recent 
call last)
 [...]
 DistributionNotFound: er

ls -l /Users/chris/Projects/client/customer/er/dev-sqlite.ini
-rw-r--r--   1 chris  chris  1436 Jan 17 23:27 
/Users/chris/Projects/client/customer/er/dev-sqlite.ini

Perhaps I'm being stupid and using it wrong. :-(
Thanks for any suggestions.



--~--~---------~--~----~------------~-------~--~----~
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