Changing class name causes process to 'hang'

Tim Johnson tim at johnsons-web.com
Sat Mar 12 14:53:03 EST 2011


I'm using Python 2.6.5 on ubuntu 10.04 32-bit.
My issue however, is with a code base that goes back to 2002,
which at that time was 1.5~ or so.

I have been since that time using my own cgi module which in turn,
uses the python standard `cgi' module.

The object instantiation has looked something like this:
## code below
cgi = cgilib.cgitools()
## /code

I choose to create a new cgi module by copying `cgilib' as `cgirev'
and renamed the `cgitools' to `Cgi' so that the instantiation
looked like
## code below
cgi = cgirev.Cgi()
## /code

And ran into problems, the cgi script would run almost to
completion, but acted like it lost track of the stack at some point
and would not terminate.

I deleted all .pyc files associated with any file that might be a
dependency. That did not solve the problem.  After scratching my head
and swearing for a couple of hours, I changed the name of the `Cgi'
class back to `cgitools' and everything worked.

## code below
cgi = cgirev.Cgi()
## /code

1)This is a mystery to me that may likely hide other issues that may
come to bite me later.

2)I don't want to be stuck with the `cgitools' classname. 

I have never used a debugger with python. Never had to, python's
error messages have always been my friend and mentor, but in this
case there are no error messages.


I would welcome hints on how to trouble-shoot this issue.
TIA
-- 
Tim 
tim at johnsons-web.com or akwebsoft.com
http://www.akwebsoft.com



More information about the Python-list mailing list