Hacker News new | ask | show | jobs
by dbcurtis 3771 days ago
first, lets be clear about Micropython, the software versus PyBoard, the reference hardware. Micropython on a Pyboard is runnunig on bare metal with no OS. Micropython is very portable, and builds nicely on Linux, yielding a nice small-footprint Python. I am not aware of a build for Android, but it seems like it should be straightforward. Everything about Micropython is tuned for low memory footprint, so it might be a great tool for Android aps.
1 comments

But Android is based on Linux, i.e. it wouldn't allow MicroPython to run directly on the bare metal.

So that would seem to make actual Python a better candidate for Android porting. I found http://qpython.com/ which seems interesting, but the site didn't look finished.

Python indeed runs fine on Android once you can get it to compile (the interpreter needs to be patched to compile with bionic, or can be compiled without patches using the CrystaX NDK). The Kivy graphical framework has the associated python-for-android project [1] taking care of doing this plus including other components like Python modules (including complex ones like numpy) and can compile with different kinds of backend (not just Kivy). There are also other projects running Python on Android in different ways.

[1] https://github.com/kivy/python-for-android

Yes, it would run on Android the way it runs on Lunux, as an OS process. The benefit is extreme parsimony with respect to RAM use.