I am creating a debugging tool.
IPython lets me do things like
MyCls??
And he will show me the source.
sys.modules[MyCls.__module__].__file__
or
inspect.getsourcefile(MyCls)
More __xxx__attributes on various objects that may be useful to you.
__xxx__
Here is a pretty good overview of the many features of Python metadata:
http://www.ibm.com/developerworks/library/l-pyint.html
inspect , .
, inspect.getsource - ; ( , ..), . inspect, URL-, getsource. , , , , try/except, , , . ( , , , import inspect , inspect).
inspect
getsource
try
except
import inspect