On Mar 16, 12:42 pm, [EMAIL PROTECTED] wrote:
> Hello everyone!
> i have the following test code:
> class temp:
>     def __init__(self):
>         self.hello = "hello world!"
>     def printworld(self):
>         print(self.hello)
> t = temp()
>
> and i tried to call profile('t.printworld()')
>
> but i received the following error:
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> TypeError: 'module' object is not callable
>
> I'm not sure what is wrong exactly, if anyone can point me to the
> right direction, it would be much appreciated!



If you're using the profile module, you need to do something like

profile.run('t.printworld()')

Good luck,

Mike

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to