Can you do this. It is about packing the Python interpreter (compiled NDK) into your application and running it using standard NDK mechanisms. This is the same as, for example, Kivy does, but you add code to your application, and not (for example, Kivy) using a java bootstrap, and then let Python control everything else.
One option that was recently discussed / developed is to use python-for-android to build all the python components, then copy them into a java project (and add code to process it). It is possible, but at the present time is not as simple as it could be, you will need to study how it works inside to get the results you need.
Another option, which is probably now easier if you don't need compiled code outside of python itself, is to directly use the pre-compiled CrystaX NDK python binaries , in which case, including python binaries, comes down to adding them to your Android .mk. You still need C and NDK code to interact with the interpreter, but the process is quite simple.
(SL4A has its own tools for creating Android, which you can also use for this, but I do not know what you need to do to integrate it, since I think that SL4A does additional things on top of that, there is a python interpreter).
source share