> class dummy_class: > def __init__(self): > print "__init__" > > def run(self): > print "run" > > > Now, I have another file test_dummy.py, which only has the foll 2 lines > > import dummy_class > d=dummy_class()
Hi Hans, In Python, modules are containers. They can contain possibly more than one thing, so you need to make sure to fully qualify the class: import dummy_class d = dummy_class.dummy_class() Does this make sense? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor