Class not loading properly in CGI

Tom Chance tomchance at
Sat Nov 22 19:24:50 CET 2003

I've got a very, very odd problem here which I can't seem to solve. I'm
creating a class instance in a CGI script, but that instance isn't
inheriting all of the methods associated with that file. Confused? Here's
what I mean:
the commands to check:
import db
mydb = db.mySQL()
print str(dir(mydb))
done in a python shell on my machine:
"['__doc__', '__init__', '__module__', 'connectTime', 'cursor', 'delete',
'fetchRow', 'fetchRows', 'info', 'insert', 'mysql', 'update']"
in the cgi script online:
['connectTime', 'cursor', 'mysql']
What on earth is going on?


More information about the Python-list mailing list