Re: Class problem
From: Daniel Pryde (dpryde+usenet_at_cis.strath.ac.uk)
Date: 12/08/03
- Next message: Aahz: "Re: Speed: bytecode vz C API calls"
- Previous message: Fredrik Lundh: "Re: from spam import eggs, spam at runtime, how?"
- In reply to: Rene Pijlman: "Re: Class problem"
- Next in thread: Rene Pijlman: "Re: Class problem"
- Reply: Rene Pijlman: "Re: Class problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 08 Dec 2003 18:02:27 +0000
Rene Pijlman wrote:
> Daniel Pryde:
>
>>when I import it and try to make an instance of it, it returns with
>>the error that 'module' is not callable.
>
>
> My guess is you should do:
>
> import spam
> eggs = spam.spam()
>
> instead of:
>
> import spam
> eggs = spam()
>
> If not, please post the source code and exact text of the error message.
>
Thanks. Sorry everyone for not posting the problem code with it. I only
have internet access at university and unfortunately the code's on my
home hard drive, however it was something like:
===========
import Image
class ImagePyramid:
def _init_(self, parameters):
do stuff :-)
===========
And I would use it as such:
===========
import ImagePyramid
pyramid = ImagePyramid(parameters)
===========
I'l try out the above solution and hopefully that'll fix things. Thanks.:-)
Daniel
- Next message: Aahz: "Re: Speed: bytecode vz C API calls"
- Previous message: Fredrik Lundh: "Re: from spam import eggs, spam at runtime, how?"
- In reply to: Rene Pijlman: "Re: Class problem"
- Next in thread: Rene Pijlman: "Re: Class problem"
- Reply: Rene Pijlman: "Re: Class problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|