[mod_python] How to keep globals

Nick nick at dd.revealed.net
Fri Nov 26 17:21:56 EST 2004


That was me.  I would recommend keeping the global in the module
namespace that contains your handler code.  You can check every request
to see if you're still connected.  Also, see the FAQ for a more complex
setup:

http://modpython.org/FAQ/faqw.py?req=show&file=faq03.003.htp

Nick

On Fri, 2004-11-26 at 14:39 -0700, Trevor West wrote:
> When I was asking about my database problems. Someone mentioned to me 
> that they kept a single global database connection and just pulled 
> cursers off that. And while I know how to do that in the context of a 
> thick client add (we build a big app with wxPython), I'm not sure how to 
> keep globals in apache other than using the session. I've seen lots of 
> examples on the web but none of it seems to make much sense...
> 
> Cheers
> 
> Trevor
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
-- 



More information about the Mod_python mailing list