2007/11/6, Donn <[EMAIL PROTECTED]>:
> > import inspect
> >
> > class Box:
> > def draw(self):
> > print "hi"
> > return 3
> >
> > x = Box()
> > print inspect.getsource(x.draw)
>
> Tried that, but get this error. I did a dir(inspect) in the command env. and
> getsource it definitely there...
>
> Traceback (most recent call last):
>   File "inspect.py", line 1, in ?
>     import inspect
>
> File 
> "/home/donn/Projects/pythoning/fontyPython/extending/cairotests/containers/inspect.py",
> line 9, in ?
>     print inspect.getsource(x.draw)
> AttributeError: 'module' object has no attribute 'getsource'
>
By now you should know that you shouldn't be naming your modules like
that. Rename your inspect.py to something else


-- 
-- Guilherme H. Polo Goncalves
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to