8 messages in com.googlegroups.pylons-discussis there a good way to stash a global...
FromSent OnAttachments
Jonathan Vanasco29 Apr 2008 07:16 
Contact 4229 Apr 2008 07:36 
Wichert Akkerman29 Apr 2008 07:38 
Contact 4229 Apr 2008 07:42 
Jonathan Vanasco29 Apr 2008 08:02 
Alberto Valverde29 Apr 2008 09:46 
Ian Bicking29 Apr 2008 09:49 
Jonathan Vanasco29 Apr 2008 10:12 
Subject:is there a good way to stash a global var, that doesn't use g/app_globals
From:Jonathan Vanasco (jona@findmeon.com)
Date:04/29/2008 07:16:52 AM
List:com.googlegroups.pylons-discuss

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?