Python kick-off

Last week I did some research on Python for mobile devices. I was so enthusiastic about the documentation I found online and the apparent ease of the language that it was also clear to me what Smartphone I would buy. After quite some hesitation I decided to go for the Symbian based Nokia N97. It beat the i-Phone because I’m already used to Nokia, it has a real keyboard, a 5 mega pixel camera and it runs on Symbian. I found this great tutorial by one of the authors of ‘Mobile Python: Rapid prototyping of applications on the mobile platform.’ I haven’t bought it yet. I’ll see how far I can get without it as there is lots of info to be found online. They do have a chapter on interfacing with an Arduino board which isn’t in the code section. To get started you only need a simple text editor and the latest stable Python for S60 (Pys60) programs which you must upload to your phone. At this moment they are the Python_1.9.4.sis and PythonScriptShell_1.9.4_5thEd.sis as my phone runs on the latest, 5th edition of Symbian. They are not at the top of the maemo list so it took me a while to find out which versions I had to download. I installed them with my Nokia software. All I had to do was to write a little script:

import appuifw
appuifw.note(u"This works", "info")

For example and store it as a .py file. Upload it to my phone. Then go to the Pys60 program on my phone, run the script and see the following astonishing result 😉


It works!
It works!

Even though the result is of course very simple a ‘Hello World’ script is quite rewarding because you know the routine of writing and uploading and you know your software is working correctly. I’m really looking forward to programming scripts on my phone because so much is possible. From databases to turning your phone into a server!

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.