class
Arun ragini
arunragini at gmail.com
Thu Apr 10 13:08:29 EDT 2008
Hi,
I have create a class file named Mysqldb.py
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 session.py
import Mysqldb
def session():
Sess = Mysqldb ("localbox")
when i try to run in using python session.py.
i get error message
TypeError: 'module' object is not callable
can any 1 help me on this.
Thanks & Regards
Arun
--
-----
Fight back spam! Download the Blue Frog.
http://www.bluesecurity.com/register/s?user=YXJ1bnJhZ2luaQ%3D%3D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080410/d783129a/attachment.html>
More information about the Python-list
mailing list