Python Forum

Full Version: Can Embedded Python run any shared library on Android ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As I have experienced, porting Python to Android is savagely difficult. However, there is a ready made Python interpreter on Android, along with its standard libraries, but porting a third party library as a Python module to Android is a nightmare. That's why I prefer the easier way as I've done on Windows, loading a precompiled library and using it like so:
from ctypes import *
lib = cdll.LoadLibrary("lib.so")
So my question is, can a Python interpreter running on Android load any shared library using this method and access its functions? Does the library have to be compiled with the 'extern C' method to be accessible? Does the library have had to be compiled with a JNI interface or is it not needed?
In summary, can Python embedded in Android use a shared library that is not compiled as a module ?