Python Forum
Can Embedded Python run any shared library on Android ?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can Embedded Python run any shared library on Android ?
#1
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 ?
Reply


Messages In This Thread
Can Embedded Python run any shared library on Android ? - by sprotz - Nov-08-2020, 12:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python bot for ADB Android SCRCPY Bizzy_ 3 473 May-01-2021, 10:41 AM
Last Post: Larz60+
  Embedded python fails to compile on Raspberry Pi tryfon 2 596 Dec-22-2020, 02:06 PM
Last Post: tryfon
  ImportError: Can not find the shared library: libhdfs3.so aupres 1 827 Oct-18-2020, 06:57 AM
Last Post: bowlofred
  memory leak on embedded python in c++ asdf3721 3 983 Jul-16-2020, 06:33 AM
Last Post: Gribouillis
  Embedded Python PyObject_CallObject function JRHeisey 1 898 Nov-27-2019, 01:50 AM
Last Post: casevh
  Developing Python with OpenCV into an Android App AviationFreak 1 3,501 Sep-29-2019, 08:55 AM
Last Post: wavic
  Calling Extended Embedding Python as shared library jibarra 0 903 Jul-19-2019, 05:22 PM
Last Post: jibarra
  Where is usually located the python interpreter on android devices? anddontyoucomebacknomore 1 1,008 Jul-03-2019, 06:32 PM
Last Post: metulburr
  Trying to implement Python into embedded OS thesurya7 2 1,010 Apr-02-2019, 06:38 PM
Last Post: ebolisa
  Multiple calls to Python interpreter embedded in C++ application yield segmentation f mmoelle1 0 1,243 Mar-21-2019, 08:54 PM
Last Post: mmoelle1

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020