Hello all,
This might be trivially easy, but I was having a hard time searching on it
since all the component terms are overloaded:-) I am wondering if there is a
way to print out the code of a defined function. So if I have:
def foo():
print "Show me the money."
then I would like to do something like:
>>> foo.show_code
def foo():
print "Show me the money."
I checked out everything in dir(foo), but everything that looked promising
(namely foo.func_code), didn't end up being anything close.
Thanks for any help!
Cordially,
Sam
_______________________
Samuel Huckins
Homepage - http://samuelhuckins.com
Tech blog - http://dancingpenguinsoflight.com/
Photos - http://www.flickr.com/photos/samuelhuckins/
AIM - samushack | Gtalk - samushack | Skype - shuckins
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor