Re: Can't instantiate class

2005-11-06 Thread Bengt Richter
On Sun, 06 Nov 2005 09:47:04 -0500, David Mitchell <[EMAIL PROTECTED]> wrote: >Thanks for your prompt reply. > >Ok, so If use your first suggestion (db = DataUtil.DataUtil() >), I get this error: > >AttributeError: 'module' object has no attribute 'DataUtil' > Have you looked to see what DataUtil

Re: Can't instantiate class

2005-11-06 Thread Fredrik Lundh
David Mitchell wrote: > Ok, so If use your first suggestion (db = DataUtil.DataUtil() > ), I get this error: > > AttributeError: 'module' object has no attribute 'DataUtil' > > If I try importing the class directly (from DataUtil import DataUtil), > I get this error: > > ImportError: cannot import

Re: Can't instantiate class

2005-11-06 Thread David Mitchell
Thanks for your prompt reply. Ok, so If use your first suggestion (db = DataUtil.DataUtil() ), I get this error: AttributeError: 'module' object has no attribute 'DataUtil' If I try importing the class directly (from DataUtil import DataUtil), I get this error: ImportError: cannot import name

Re: Can't instantiate class

2005-11-06 Thread Fredrik Lundh
David Mitchell wrote: > Here is a very basic question, but it is frustrating me to no end > nonetheless. > > I have one file called addLink.py. In a method in this file I am trying > to instantiate a class and call a method from that class. Here is the code: > > def getCategories(): > # instantiat

Re: Can't instantiate class

2005-11-06 Thread Michael P. Soulier
On 11/6/05, David Mitchell <[EMAIL PROTECTED]> wrote: > import DataUtil > >File "C:\Apache2\htdocs\Intranet\addLink.py", line 42, in getCategories > db = DataUtil() > > TypeError: 'module' object is not callable You've imported module DataUtil, and by calling DataUtil(), you're trying to

Can't instantiate class

2005-11-06 Thread David Mitchell
Hello, Here is a very basic question, but it is frustrating me to no end nonetheless. I have one file called addLink.py. In a method in this file I am trying to instantiate a class and call a method from that class. Here is the code: def getCategories(): # instantiate the DataUtil clas