Re: Can't instantiate class

2005-11-06 Thread David Mitchell
: 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 &q

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

Where to save classes? How to access classes?

2005-10-31 Thread David Mitchell
Hi, I'm trying to get into the object oriented aspect of Python. If I create a custom class (in it's own file), how do I access that class in a function in a different file? In Java there's the notion of a CLASSPATH, where you can tell the compiler to look for classes. Is there something simil

Problem With Insert with MySQLdb

2005-10-30 Thread David Mitchell
Hello, I am a complete beginner with Python. I've managed to get mod_python up and running with Apache2 and I'm trying to a simple insert into a table in a MySQL database. I'm using the MySQLdb library for connectivity. I can read from the database no problem, but when I do an insert, the value