Is there functions like the luaL_loadfile and luaL_loadbuffer in lua source to dump the lua scripts in Python's source?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Tue Apr 14 15:14:18 CEST 2015


On Tue, 14 Apr 2015 10:07 pm, zhihao chen wrote:

> HI,I  want to dump the python script when some application(android's app)
> use the python engine.they embedding python into its app.
> <https://docs.python.org/2/extending/embedding.html>


*If* the source code is still available, which it may not be, then
inspect.getsource can find it:

https://docs.python.org/2/library/inspect.html


For the source code to be dumped, it needs to be Python code (not a built-in
or C extension object), the .py file still needs to be available where
Python can see it (not just the .pyc file), and you need to have read
permission.


-- 
Steven




More information about the Python-list mailing list