noob import question
Brian Blazer
brian at brianandkate.com
Fri May 19 09:24:22 EDT 2006
OK, I have a very simple class here:
class Student:
"""Defines the student class"""
def __init__(self, lName, fName, mi):
self.lName = lName
self.fName = fName
self.mi = mi
Then I have a small script that I am using as a test:
from Student import *
s1 = Student("Brian", "Smith", "N")
print s1.lName
This works as expected. However, if I change the import statement to:
import Student
I get an error:
TypeError: 'module' object is not callable
I have tried to look up what is going on, but I have not found
anything. Would it be possible for someone to take a minute and give
an explanation?
Thank you - your time is appreciated.
Brian
brian at brianandkate.com
More information about the Python-list
mailing list