instantiating a class

phil hunt philh at comuno.freeserve.co.uk
Sat Mar 9 08:00:13 EST 2002


On Fri, 8 Mar 2002 23:23:08 -0600, Carl <kingprad at mail.com> wrote:
>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!

What i would start with is renaming one of your lj_connect's. Then 
you'd know which one it is complaining about.

-- 
<"><"><"> Philip Hunt <philh at comuno.freeserve.co.uk> <"><"><">
"I would guess that he really believes whatever is politically 
advantageous for him to believe." 
                        -- Alison Brooks, referring to Michael
                              Portillo, on soc.history.what-if



More information about the Python-list mailing list