Hacker News new | ask | show | jobs
by txprog 3374 days ago
Please note that Python for Android project is not meant to be used with Kivy only anymore.

It's a project that allow you to compile Python and dependencies, and package it along your own application. You could for example compile Numpy, ZMQ, sqlalchemy, zeroconf, etc...

We have a mechanism called bootstrap that allow you to select your primary technology that you're going to use for your application, such as "sdl2" (required for kivy), "webview" (it just start a webpage that connect to your phone port 5000, so you can start an embed webserver such as Flask to serve your app), "service_only" (if you don't need any kind of UI). New bootstrap can be written to support another type of apps.

Also, you could embed your whole UI in pure java if you wanted too, as the directory libs (to include .jar) or src (to include .java) are compiled. So you can imagine having your app in Java, but still call Python for something else if you really wanted too.

4 comments

Just an addition, there is many others alternatives, but it may be hard for others to be able to compile the Python extensions you want (or impossible). That's what we wanted to do here: ability to pick the extension needed, provide a "recipe" that contain specialized tricks or patches to extension for running in Android, etc.
> So you can imagine having your app in Java, but still call Python for something else if you really wanted too.

That's a pretty interesting possibility, I might tinker with this. I don't mind Java, but vastly prefer Python+numpy+scipy for technical computing and algorithmic experimentation. Java for the GUI/platform specific stuff with the creative stuff in Python works well for some side projects that I've done. In those cases, I interfaced them via REST API to a server, then later translated to pure Java.

Suggestion : could you add a section on the github page explaining what is the use case is for this ?
Amazing.