Class not loading properly in CGI

Jp Calderone exarkun at intarweb.us
Sat Nov 22 22:22:53 CET 2003


On Sat, Nov 22, 2003 at 06:24:50PM +0000, Tom Chance wrote:
> Hullo,
>  
> 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?

  Try printing db.__file__

  Jp






More information about the Python-list mailing list