Archaeopteryx Software, Inc.
Take Flight!Search

Home
Wing IDE
News
Support
About Us
Python
Open Source
Store

 Search:
 
 Advanced Search




[wingide-users] mod_python usage

Brian Brown BBrown@icce-t.com
Thu, 25 Apr 2002 10:36:44 -0600


On Thursday, April 25, 2002, at 09:34 AM, Stephan R.A. Deibel wrote:

> On 25 Apr 2002, Ken Kinder wrote:
>> The reason I ask is, I don't think threading is compiled into this
>> instance of python. However, I can use the debugger on individual file
>> (no CGI) just fine... So I didn't think of threading to be the
>> problem.
>
> I'm not 100% sure but I think mod_python is threaded by default.
>

No, mod_python won't be threaded until the port to Apache 2.0 is done. 
You currently have to compile python without threads for use with 
mod_python...


> To clarify the source of the calls, you could add something like this to
> wingdbstub.py to see more clearly how it is being imported:
>
> import thread
> print "****** THREAD", thread.get_ident()
> import traceback
> traceback.print_stack()
>
> I have heard of at least one other user that uses Wing with mod_python
> but they made it sound like it just worked, so I may indeed be barking
> up the wrong tree.
>
> Other stuff to try:
>
> 1) You might also try moving the line in wingdbstub.py that says:
>
>   os.environ['WINGDB_ACTIVE'] = "1"
>
> To the start of that block (just after the check of this env).
>
> This may block the second attempt at starting the debug machinery,
> which I believe might be happening before the first start is complete.
>
> 2) It's also possible mod_python is messing with os.environ (seems 
> fairly
> likely given how CGI works)... so you may need to add other code of some
> type to avoid the second invocation.
>
> 3) Another approach would be moving the 'import wingdbstub' closer to 
> the
> code you want to debug... this may work around the problem.
>
> - Stephan
>
> _________________________________________________
> Archaeopteryx Software, Inc.
> Wing IDE discussion list
> http://archaeopteryx.com/support/forum
>
>






Run by Mailman v 2.0.8


Copyright (c) 2000-2002, Archaeopteryx Software, Inc.
Legal Statements