Summary
Nokia gave me a phone to run Python. I wish I could blog all night about it! The phone is great, but the really cool part is how much effort Nokia has put in opening up the functionality to Python programmers! A tip of the iceberg.
Full disclaimer: Every once in a while I get a boondoggle out of being Python's BDFL. The most recent is a model 6630 phone that Nokia gave me as an early Valentine. So my review cannot be considered objective -- be warned!
I don't quite know where to start. The phone itself, even without Python, is incredibly cool; I spent much of the weekend using it as a camera, and it worked remarkably well considering that it doesn't have an optical zoom or a flash, and is "only" 1.3 megapixels.
The phone came with a cable to connect it to USB port, and a CD full of software - Windows only. I guess this means I can sync it to Outlook or so. But I don't use that any more. On my Mac, plugging in the USB cable doesn't seem to do anything, and there's no Mac software on the CD, but guess what: iSync supports this phone over Bluetooth (with the right icon and all!). And they don't even sell this model in the US. Great job, Apple!
Next, Python. I still haven't written any significant Python code for the phone, but I've explored Nokia's examples a bit and walked through most of the MobiLenin.com tutorial (see previous blog).
When writing Python code for a phone, of course the first obstacle is, how to write code? You don't really want to edit your code on the phone's numeric keyboard! Fortunately there's a way to connect a PC or Mac to the phone over Bluetooth, and the Python application on the phone supports interactive sessions this way (as well as an interactive session on the phone's own screen -- with 11 lines of about 20 characters each not very attractive beyond "print 2*2", but essential for mini-demos in Google's hallways). Thanks to Eric Smartt's blog for giving me the hint I needed to get this working on the Mac.
So on to the vast array of APIs available. Nokia has really done an outstanding job here. There are extension modules that handle all of the phone's devices: dial a call, snap a picture, send/receive SMS, Bluetooth, and Internet (if your service provider offers it of course); as well as the key applications (calendar and address book, and probably more that I haven't even discovered). You can also play sounds, view images, draw into a canvas, or open any file that the phone understands natively. And of course the GUI library -- menus, dialogs, a low-level event loop, etc. Stuff for which standard Python libraries exist generally uses those -- the filesystem (ROM, RAM, memory card, flash) of course, but also the Internet -- urllib "Just Works" (TM), and you can even write a server if you want to (your service provider will probably love it: I signed up with Cingular which charges a penny per kilobyte -- what a rip-off).
Anyway, gotta run (sleep, more like it :-). I just had to put this out. Oh, there are lots of resource pointers on the MobiLenin.com intro and resources pages. Thanks Jürgen Scheible!!!