Friday, July 10, 2009

Python in the Android Emulator

I have recently started playing around with the Android platform; more specifically I have begun experimenting with Python development on Android through the Android Scripting Environment (or ASE, as its called).

In ASE you are able to run Python 2.6.2 scripts that, as far as I can tell so far, have full access to the underlying Python libraries. Furthermore, through the "android" module, you gain access to some Android specific things like location services, sensor data, sms messaging, and more.

One problem with ASE though is the fact that it is impossible to run a Python program within the Android Emulator. When you try to start a Python script all you get is a black screen. This is due to some sensor-thingy not being available in the emulator, and the suggested fix is to rebuild ASE with the sensor service disabled.

To spare others of the pain involved rebuilding ASE from source (it is really not that hard, just takes some valuable time away from coding in Python), I will share my build of ASE that actually works in the emulator. You can download it here: ASE Emulator build (do not use this on a real device!). This build is provided as is; I will not be held liable if it blows up your computer, burns down your house, or runs away with your wife ;-)

No comments:

Post a Comment