Archived:Python on Symbian/Preface
Python on Symbian is a great way to start your adventure in mobile programming!
Python applications ("apps") look like native C++ apps, can access the same important platform services, and can be distributed through the same channels.
The main difference between Python apps and native C++ apps is that, because of Python's simple human readable syntax, you can write quite remarkable apps after only a few hours of study. Although some computationally intensive applications cannot be written in Python it is, for almost every other purpose, a fun, fast and completely free alternative to native C++ development.
Some example Python apps include:
- Birthdays for S60
- Birthdays for S60 is a calendar writer for Symbian S60 3rd and 5th Edition Smartphones. It lists birthdays from your contacts in chronological order and writes them to your Calendar. More information is available at http://licensing.symbian.org/
- Nixie Watch
- Nixie Watch is a fancy clock for your mobile device. More information at http://sites.google.com/site/jounimiettunen/nixiewatch
- TouchComic is a comic book reader that handles .zip and .cbz ebook formats, with fullscreen view, automatic rotation, zoom function, presets. More information can be found at http://www.symbian-guru.com/welcome/2009/11/get-your-comic-book-fix-with-touchcomic.html
- The GoogleVoiceForS60 app uses Google Voice, synchronizing your phone's contacts with your Google Voice account. It allows you to initiate a Google Voice call with the same options as the website and allows you to send text messages. More information can be found at http://www.symbian-guru.com/welcome/2009/10/exclusive-look-at-googlevoicefors60-for-symbian.html
- GTranslate lets you translate text from English into 37 different languages, send the translated text as SMS, or copy & paste it, for example, into an email or a note. More information can be found at http://www.symbian-guru.com/welcome/2009/05/gtranslate-pys60-google-translator-v100-released.html
- NiiMe is an application that uses the phone's accelerometer to control your PC - using it as a mouse. More information can be found at http://www.niime.com/
- Unitiy is a cool puzzle game. The aim is to clear the whole playing area by removing tiles in groups. The more tiles you remove at the same time, the more points you get. More information at http://sites.google.com/site/jounimiettunen/unity
Here are few screenshots of Python applications,
Wordmobi: A client for Wordpress which helps you to manage your blog while saving time and bandwidth.
Tracker: A GPS mapping application for hikers who want to track their position on a digitized map.
Scribble: A Paint-like application which demonstrates the use of touch support.
GTranslate: Translates text from English into 37 different languages.
Jomtris: A Tetris-like game.
FuelLog: A fuel consumption and fuel expense monitor for recording, storing, calculating and exporting fueling data and fuel consumption for your vehicles.
Who is this book for and what does it contain?
If you want to develop powerful mobile apps with the minimum effort and learning curve, this is the book for you!
It's intended for readers of all levels of experience, from beginners to advanced users of Python on Symbian. We don't assume any knowledge of Python and we cover (almost) everything from basic Python concepts, such as variables, functions and classes, to advanced concepts like platform services and advanced network programming.
We've divided the book into a series of self-contained chapters, each of which discusses a specific and important feature of Python on Symbian:
- The first couple of chapters of the book introduce you to generic Python and to Python on Symbian. They cover the language, coding conventions, basic programming elements and how to get started.
- The following chapters explore the user interface and show you how to write applications using telephony, messaging, graphics and multimedia.
- Later in the book we look at advanced features: network programing, location-based services and platform services.
- Two chapters briefly describe extending Python on Symbian and debugging techniques.
- The book also describes how to package and sign your apps so that they can be published to app stores.
Throughout the book you'll find illustrations, screenshots and example code. It's a book to boost your knowledge of mobile phone programming and make it fun!
If you're already familiar with the popular book about using Python on Symbian published in 2007 (Mobile Python: Rapid prototyping of applications on the mobile platform, by Jurgen Scheible and Ville Tuulos, John Wiley & Sons), you'll find this book to be its natural successor. This book has a slightly different focus, with its emphasis on developing fully-fledged Python applications, so even if you're already a Python expert from reading Jurgen's book we hope that you will still get something out of this one. Python for Symbian has been updated since that book was released and has new ways of deploying and installing apps.
Python version used in the book
This book is based on Python on Symbian v2.0.0, the most recent version available at time of writing, which is in turn based on the Python 2.5.4 release.
Even though the book targets Python on Symbian v2.0.0, much of the information is applicable to earlier versions and most is likely to remain relevant in future versions. Since we are publishing the book on wiki, we will update sections as they become out of date (and encourage readers to do likewise). If you are reading this book in print version, you may wish to check the main wiki page (http://www.developer.nokia.com/Community/Wiki/index.php/Category:Python) to see if there have been major updates to the text since your book was printed.
Python on Symbian is hosted by the Maemo garage. See https://garage.maemo.org/frs/?group_id=854 for the package landing page.
Where to find supporting example codes and the online edition of this book?
This book is part of the Symbian Foundation wiki books project. So besides the printed version of the book, which can be purchased from Amazon.com, an online free eBook is available at ____ for you to download. The eBook is licensed under Creative Commons Attribution-Share Alike v2.0 England & Wales license.
The book is also available directly from the Nokia Developer wiki, at Python on Symbian.
The example code quoted in this book is made available wherever possible and can be downloaded from here. The code is available under Public Domain license and may be reused freely.