> 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' /d -- http://mail.python.org/mailman/listinfo/python-list