Arun ragini arunragini at
Thu Apr 10 19:08:29 CEST 2008


I have create a class file named

class Mysqldb:
        def __init__(self, name):
                #this where it tries to connect to database
                self.ip = ip
                print "Inializing session for name"

        def test(self):
                print "worked"


now i'm trying initialize this another python file called

import Mysqldb

def session():
      Sess = Mysqldb ("localbox")

when i try to run in using python

i get error message
TypeError: 'module' object is not callable

can any 1 help me on this.

Thanks & Regards

Fight back spam! Download the Blue Frog.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list