globalrev wrote: > On 16 Maj, 13:54, Peter Otten <[EMAIL PROTECTED]> wrote: >> Christian Heimes wrote: >> > globalrev schrieb: >> >> cust1 = customer.__init__('12',['1','435','2332']) >> >> > cust1 = customer('12',['1','435','2332']) >> >> ... and before that >> >> from customer import customer >> >> Peter > > why do i have to write that? > > if i do import customer im importing everything no? > > but youre right it doesnt work unless i do, i just dont get why.
It becomes clearer if you follow the usual naming conventions and start the class name with an uppercase letter: # in file customer.py class Customer: # your code The import then becomes from customer import Customer i. e. the first "customer" denotes the module, the second "Customer" the class. Peter -- http://mail.python.org/mailman/listinfo/python-list