Live data from Hacker News

Python on Android

kivy.org

21–30 of 51 posts

Re: Python on Android

#23

In my view a gaping hole in the Python for Android "stack" is the lack of Tkinter. I know that there are technical hurdles, though I don't understand them.

Wonder if some of the work from here [1] could be leveraged to fill that hole faster. [1] http://www.androwish.org/index.html/home

That looks interesting, since one website said that lack of Tk/Tcl was the obstacle.

I'm not desperate, for now. My interest was piqued when I got interested in Python and Android almost simultaneously, was delighted to see that Android 3 would support Python, and bought an Android 3 tablet.

All of this is just in the name of recreational programming. My weird dream is to be able to write and run my code on any computer. But an un-anticipated side issue is that coding on a tiny screen is no fun at all at my advanced age.

Re: Python on Android

#24
I've been playing with SL4A (scripting languages for Android), but there doesn't seem to be any active engagement by the project owners.

An actively maintained Python-for-Android with some way to access native Android APIs is great news. I want to poll an Arduino-based web server and send out SMSes if alert thresholds are reached, and a little python script seems just the ticket.

Re: Python on Android

#26

OT: > the unimaginatively-named python-for-android project. I love that name. Much better than the "imaginatively" named grunt, travis, react, kivy, vagrant, etc.

I teach intro CS to non-majors, and having to explain terminology is cumbersome. For instance, we call things "strings", "floats", and "dictionaries". And then I make them download Anaconda so they can get Spyder to write Python programs. I can't help but wonder what goes through their heads.

Re: Python on Android

#27
post #4

Kivy is really cool, but getting started on it sort of sucks. Lots of compilation errors (especially if you're trying to install on windows) due to its dependencies on pygame (and therefore cython, and therefore a particular version of MSVS for the specific dll... all a hassle). The on-site tutorials are sort of obtuse too, if you're looking to do UIs rather than games - until other resources[1][2] became available,…

On Ubuntu it's really easy though. This is why I switched OSes a few years ago. Things are just easier if you use the same platform as other developers.

Until I entered the workforce proper, I got to work on mostly linux. Since going into the Seattle startup and then consulting worlds, there's a lot of Windows development, even on servers. So I try to be pretty agnostic about dev platform. Kivy doesn't really provide that luxury.

Re: Python on Android

#28
I also did give a try after I saw a post here on HN about a new release. I wasn't very happy with it. There were many bugs that's a complete mess to get started with.

I tried the example on their documentation and got it running on my Linux box (which was very easy), but kept failing on Android due some missing dependency. These issues are not listed on their website, giving the impression it will just work out of the box. There by wasting a lot of time for anyone wanting to give it a try. After much googling I got to find out that SDL is not supported on Android for Kivy. You have to use PyGame and PIL. PIL isn't maintained anymore, so you can't just do:

    pip2 install PIL 
Instead I had to run:

    pip2 install --no-index -f http://dist.plone.org/thirdparty/ -U PIL
Pillow didn't work for me, complained that it was compiled for some other platform. With that I was able to get rid of 'No text provider found' dependency error, but still I can't open the application because of some 'Window provider not found' error. I left it at that.

It's a cool project and I'd like to see it succeed, but there is a long way to go. I'd appreciate if someone could post a link on how to setup an environment that setups Kivy to build for Android.

Re: Python on Android

#30
post #7

So, I've actually been working for the past while on a project to allow building more native apps on Android using Python. It is built on the Kivy tools, but I have had to make some changes to python-for-android specifically because it's not as seperated from Kivy as the developers think. I've also had to make a small change to PyJNIus, as it has a dependency on SDL when on Android. The reason I chose to work on this…

So it's conceptually similar to React Native, but Python instead of JS(X)?
Post reply on HN