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 DataUtil


Could these errors have something to do with the fact that I am doing 
this through mod_python?

Thanks again,

Dave

Michael P. Soulier wrote:
> 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 call the module, hence the error. I think you want
> 
> db = DataUtil.DataUtil()
> 
> Or,
> 
> from DataUtil import DataUtil
> 
> And then your code will work.
> 
> Mike
> 
> --
> Michael P. Soulier <[EMAIL PROTECTED]>
> 
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to