Re: is there a good way to stash a global var, that doesn't use g/app_globals

2008-04-29 Thread Wichert Akkerman
Previously Contact 42 wrote: what's wrong with a normal python module. Thread safety. Wichert. -- Wichert Akkerman [EMAIL PROTECTED]It is simple to make things. http://www.wiggy.net/ It is hard to make things simple.

Re: is there a good way to stash a global var, that doesn't use g/app_globals

2008-04-29 Thread Contact 42
Wichert Akkerman wrote: Previously Contact 42 wrote: what's wrong with a normal python module. Thread safety. Wichert true, but for config stuff that never changes i.e constants, I don't see a problem. Huy --~--~-~--~~~---~--~~ You received this

Re: is there a good way to stash a global var, that doesn't use g/app_globals

2008-04-29 Thread Jonathan Vanasco
because i won't know the name of appconfig.py i'm creating a subclassable framework for distribution DerivedApp/ DerivedApp/model BaseApp/ BaseApp/lib/helpers I'm trying to get the BaseApp/lib/helpers to access Globals, so that it can access objects in DerivedApp/model (which might have

Re: is there a good way to stash a global var, that doesn't use g/app_globals

2008-04-29 Thread Alberto Valverde
Jonathan Vanasco wrote: 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

Re: is there a good way to stash a global var, that doesn't use g/app_globals

2008-04-29 Thread Ian Bicking
Jonathan Vanasco wrote: because i won't know the name of appconfig.py i'm creating a subclassable framework for distribution DerivedApp/ DerivedApp/model BaseApp/ BaseApp/lib/helpers I'm trying to get the BaseApp/lib/helpers to access Globals, so that it can access objects in

Re: is there a good way to stash a global var, that doesn't use g/app_globals

2008-04-29 Thread Jonathan Vanasco
my DerivedApp/model is a subclass of BaseApp/model , etc etc i've got helpers working as you suggested too the issue i was hitting, is that in the BaseApp/helpers i'm trying to create a function that interacts with DerivedApp/Model i got around it by just passing in model, this will work for