retrieve source code from code object as returned by compile()

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Apr 25 20:03:10 EDT 2014


Amirouche Boubekki wrote:
> in python3, I do inspect.getsource(object) [doc 
> <https://docs.python.org/3/library/inspect.html#inspect.getsource>], I 
> don't know the limitations.

The limitation relevant here is that it requires the
original source file to be present. :-)

-- 
Greg



More information about the Python-list mailing list