Class problem

Daniel Pryde dpryde+usenet at cis.strath.ac.uk
Mon Dec 8 13:02:27 EST 2003


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





More information about the Python-list mailing list