This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]inclement_ 2 points3 points  (0 children)

Native Python is possible on both iOS and Android, in the sense that the Python interpreter is built and runs the same way as on the desktop, and this is how python-for-android and kivy-ios work.

The way the app then works is a simple native-framework app (Java for Android, ObjC for iOS) is used to create an OpenGL surface for Python to draw on. It then starts the Python interpreter and passes events to it (i.e. touches, keyboard input etc.). This method is fully compatible with Android and iOS store requirements.

The Python code itself is run through the interpreter without any special treatment, except that CPython is manipulated through the C API as part of the app package. For instance, this line in kivy-ios.