<div dir="ltr"><div><div>in python3, I do inspect.getsource(object) [<a href="https://docs.python.org/3/library/inspect.html#inspect.getsource">doc</a>], I don't know the limitations.<br><br></div>On Python 2, there is <a href="https://pypi.python.org/pypi/meta">meta</a>.<br>
<br></div>My interest is different, I use to retrieve the definition of function to submit it to a database, instead of stored procedures, but I have the source of the code. It can also be used to retrieve the ast.<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">2014-04-25 4:50 GMT+02:00 Justin Ezequiel <span dir="ltr"><<a href="mailto:justin.ezequiel@gmail.com" target="_blank">justin.ezequiel@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thursday, April 24, 2014 1:53:38 PM UTC+8, Gregory Ewing wrote:<br>
> Alternatively you could create a .pyc file out of the code<br>
> object and then use Easy Python Decompiler on that. The<br>
> following snippet of code should do that:<br>
><br>
</div>> (Taken from:<br>
><br>
> <a href="http://stackoverflow.com/questions/8627835/generate-pyc-from-python-ast" target="_blank">http://stackoverflow.com/questions/8627835/generate-pyc-from-python-ast</a>)<br>
<br>
Woohoo! Success! Thank you Greg!<br>
<span class="HOEnZb"><font color="#888888">--<br>
<a href="https://mail.python.org/mailman/listinfo/python-list" target="_blank">https://mail.python.org/mailman/listinfo/python-list</a><br>
</font></span></blockquote></div><br></div>