instantiating a class

Carl kingprad at mail.com
Sat Mar 9 00:23:08 EST 2002


I'm an intermediate-level python programmer and use classes all the time,
but a weird problem is frustrating me.

In my main program:


import lj_connect

blah blah code

talkserver = lj_connect.lj_connect(userinfo)


the start of lj_connect.py is this:

class lj_connect:
 def __init__(self,basic_data):
  self.uinfo = basic_data


I'm getting an AttributeError saying module lj_connect has no attribute
lj_connect. Originally the lj_connect code was in the same file as the main
program until I moved it for readability's sake. Can anyone see a problem?
Thank so much!

Carl





More information about the Python-list mailing list