Symbian developer community

 
wiki

Python in a Nutshell

From Symbian Developer Community

Jump to: navigation, search

Nutshell guides are technology introductions for the less technical reader. They are designed to provide an overview of the relative advantages/disadvantages, and effort-to-use of a particular programming environment.

Python for S60 makes use of the standard Python language and brings mobile phone specific APIs to aid developers. It is an easy-to-learn but powerful scripting language. Many common tasks can be achieved in just a few lines of code by using its extremely comprehensive standard library. It is ideal for rapid prototyping and development of mobile applications.

Contents

Key features

  • Ease of use - the Python language is very easy to learn and it is easy to develop applications with it. A lot can be achieved with little code and testing applications in the form of scripts dramatically reduces the time and effort required by a project.
  • Rapid Prototyping - Best option for rapid prototyping of Symbian applications. Rapid prototyping is the most effective way of demonstrating a product, when compared to presentations and SRS documents.
  • Powerful tool for the rapid development of mobile applications and utilities.
  • Extensibility - extensions can be written in Symbian C++ in order to enhance Python's functionality.

Pros and Cons

Pros
  • Very easy to learn and use; Ideal for testing application models before implementing them using the native language.
  • Python a powerful runtime - access to the filesystem, messaging, contacts database, local connectivity, camera, gallery, sensor framework, GPS, etc.
  • Scripts can be tested interactively on the emulator without building.
  • More functionality when compared to other runtimes like Java and Flash Lite.
  • The same script can run on both emulator and device (as compared to Symbian C++ where a different binary format is required).
  • Good UI-layer support, with extension possible (as below).
  • Can be extended through native extension modules for additional functionality.
  • Available on Symbian^1, and S60 devices from 2nd Edition onwards.
  • Python for S60 is an open source project, which means developers can modify and build their own, enhanced versions of the runtime.
  • Tools are free.
Cons
  • Python not supported on other mobile device platforms.
  • Less functionality than native Symbian C++
  • Python runtime must be manually installed on devices using Python applications.
  • Python's performance is reasonable but still slower than Symbian C++. It is not suitable for high performance applications e.g. video streaming.

Effort Estimate

3 (1 - 10, where 1 is the easiest)

Market Share Indicator

Python for S60 is available for devices ranging from S60 2nd Edition through to Symbian^1, as an after-market installation.

Examples

  • PyCalc – a utility that demonstrates how to link several scripts and make use of other resources, such as images
  • ShakerRacer – allows you to control a toy racing car with your phone through Bluetooth
  • Location Scheduler – trigger alarms or reminders according to location
  • Tracker – an advanced application that makes use of GPS and maps
  • Unity – an excellent example of the potential PyS60 has for game development
  • Sensor Sample - demonstrates how to use the built-in Sensor API in Python applications
  • Scribble - Paint like application demonstrating use of touch support (compatible with PyS60 1.9.5 and an S60 5th Edition device/SDK)
  • GTranslate - Python application that uses Google translator API to translate English to other languages
  • Mopymaps - Mobile Yahoo! Maps application
  • Many examples from Mobile Python book

Reference

Comments

Sign in to comment…