[wingide-users] mod_python usageStephan R.A. Deibel firstname.lastname@example.org
Thu, 25 Apr 2002 11:34:29 -0400 (EDT)
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. 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
Run by Mailman v 2.0.8
Copyright (c) 2000-2002, Archaeopteryx Software, Inc.