[web2py] Re: AttributeError: 'thread._local' with wsgiref.simple_server or similar

2011-07-21 Thread Christopher F
Well, I solved it somehow. If I import web2py.gluon.main and use web2py.gluon.main.wsgibase, exec ccode in environment will reimport web2py and web2py.gluon.globals.current will be created within the environment each time. If I import gluon.main and use gluon.main.wsgibase, current will be

[web2py] AttributeError: 'thread._local' with wsgiref.simple_server or similar

2011-07-20 Thread Christopher F
Hi, I'm trying to call web2py.gluon.main.wsgibase depending on whether a url path matches. The code is like this: [...] os.chdir(web2py_dir) import web2py.gluon.main os.chdir(current_dir) [...] if [...]: httpd =