what's wrong with a normal python module.

appconfig.py

APPNAME = 'myapp'

then where ever you want it.

import appconfig

model = getattr(__import__(appconfig.APPNAME, {}, {}, ['']), 'model')



> I need to run an import like such:
>
> model = getattr(__import__(g.APPNAME, {}, {}, ['']), 'model')
>
> the problem is that I get a bunch of errors like this:
>     TypeError: No object (name: G) has been registered for this thread
>
> because of the import order
>
> can anyone suggest a good way to handle stashing the APPNAME for an
> import of this type?
> >   


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