snakes on a phone - europython 2007

This talk was about Python on Nokia s60 phones.

These are my notes...

Discusses implementation details - like what they had to change to get it working nicely. He also discussed what you can do with the phone - which turns out to be most things. Like accessing the camera, and sending/receiving sms.

It's based on python 2.2, but has had some things back ported. Like the pymalloc. He said at some point they might update the python to a newer version. The schedule is 'The future - a closer future than before.'. Then of course before that he said 'the future is now' - probably those two statements aren't related, and were taken out of context.

Including not using writable static data, and the modifying interpreter for the security model on the phone. The security model includes using capabilities, and signing executables. There are different levels of signing certificates. The basic ones are free, but others require contracts and money.

By default as python can run scripts the default capabilities. So the capabilities for the python are limited. You can sign it yourself if you want to though.

Even then it won't let you do somethings to your own phone. You'll need a manufacturer certificate to do some things.

It's interesting to compare the pocketpc python which you can run on windows mobile phones, and the nokia one. The pocketpc python seems to be a newer version - but the nokia python is supported by nokia employees. I'm not really sure which are integrated better with the phone.


He demonstrated using the phone via blue tooth. So he could have the interpreter running on his laptop, and running the code on the phone.

import camera
img=camera.take_photo()

Guess what that code does? That's pretty easy!

import messaging
messaging.sms_send('+3112342134234', u'a message')

import telephone
telephone.dial('+3109832405830495')
telephone.hang_up()
telephone.say(u'hello europython')

It all seems pretty cool, and makes me want to pick up a second hand s60 phone. I guess the next step will be for someone to make portable code so you can run the same python code on different mobile phones (pocketpc, s60, linux, etc).

He talked about trying to get their changes into the main python. Including things like reducing memory usage. Reducing memory usage would also be great for servers too - the less memory you use. So hopefully some of those changes can go back into the main python.

Comments

Popular posts from this blog

Draft 3 of, ^Let's write a unit test!^

Is PostgreSQL good enough?

post modern C tooling - draft 6