I recently had the opportunity to do some research with the goal of being able to run Python on any iOS device (iPhone, iPad, iPod touch). The idea is to only write some Python code (and nothing else) and deploy that to different platforms without changing it (e.g. Windows, Linux, Mac OS X, Android, iOS).
If you’re interested, here’s a preview/draft document that at a very high and easy to understand level very roughly summarizes what had to be done.
Now I’m not saying that this is THE way to develop cross-platform software, especially for devices such as tablets. The goal just was to see whether or not it’s technically possible and feasible to write applications for iOS using Python only. Fortunately, it seems possible and actually the programs run pretty snappy. They also use the GPU for rendering using OpenGL ES 2.0. Also, there was no jailbreak necessary.
Consider this work in progress. There’s still many things on the TODO list, I just wanted to share the early results with you and let you know that it is in fact possible. The code is on github and I’m using the kivy framework. I’m looking for opportunities to present this in much more depth in a journal or at a conference. If you know of any opportunities, please send me a mail (address in the PDF).
Update: I mentioned the code to be on github, but didn’t provide any actual links as I was in a hurry when I wrote the blog post. Here are the links: Python for iOS repo (compiles Python 2.7 for ARM, based off of cobbal’s repo): https://github.com/dennda/python-for-iphone Kivy iOS support branch: https://github.com/tito/kivy/tree/ios-support Objective C test app that embeds Python and runs a Kivy example: https://github.com/dennda/python-for-iphone-test You will also need SDL 1.3.
And last but not least I’d like to repeat what I wrote in the PDF and thank my friend Mathieu Virbel (from the kivy team) for all the help. I especially enjoyed the hack session we had at UDS.
| 10 comments | Jul 8, 2011 7:27:00 PM | gsoc, iOS, ipad, iphone, ipod, kivy, multi-touch, nerdstuff, planet-kivy, planet-python, planet-ubuntu, python, research, technology |
Putting Ubuntu (or even better, Debian) on the iPad would be much more interesting.
Wow, this is very cool! Can not wait to see where this goes. You mentioned that the apps are “pretty snappy”. What does this translate to in terms of fps?
Kudos :) we also getting Kivy to run on BeagleBoard and other embedded devices
God blesses!!!
Best regards,
Sanyaade
Foo, while I can understand your desire to run your favorite Linux distribution (and mine) on the iPad, trust me when I say that iOS is actually a pretty decent system and putting a desktop operating system on a tablet is about the wrongest approach you can choose. Microsoft learned that the hard way. There have been tablets like the JooJoo running Ubuntu (tried that myself) and the experience was obviously not a pleasant one. For tinkering, sure.
[…] Related articles Christopher Denter: Python on iPhone & iPad (the-space-station.com) Analyst ups AAPL on strong projected iPad, iPhone sales (tuaw.com) Speculation on the iPhone 5 […]
This is awesome news. Being able to run python on ios is a huge thing ! Awesome work.
Hi !!! Your article it’s just great, I have translated to my primary language (Spanish) and put it on my new site: blog.desdelinux.net/python-en-iphone-ipad-ios/
Really, thank you for your effort and work, I sincerely hope you find the opportunity to present your progress.
Greetings and again … THANK YOU VERY MUCH.
[…] Buzz by Chris McGraw from Google Reader Buzz by Chris McGraw from Google Reader Buzz by Chris McGraw from Google Reader […]
[…] code (and nothing else) and deploy that to different platforms without changing it (e.g. Windows, Linux, Mac OS X,… Read more… […]
[…] into a “Python on the iPad and iPhone” article at this blog, and thought it could point you in the right direction… Python on iPhone The Space Station J […]