HomePython Page 2 - Mobile Programming in Python using PyS60: Getting Started
Dynamically loadable libraries or extensions - Python
Smart phones are becoming a common sight nowadays. Above all, the "smartness" of smart phones come from the fact that they can be programmed. In other words, one can develop custom applications for these mobile devices and use them in the devices. This article covers the basics of developing these kinds of applications in a variant of Python.
These extensions, as the name suggests, are loaded dynamically i.e. only when needed as opposed to the built-in extensions which are loaded when the import statement is encountered. The reason for this behavior is that the dynamically loadable extensions provide access to the proprietary S60 API. There are 16 dynamically loadable extensions. The most commonly used among them are:
Graphics, which provides access to the graphics manipulation capabilities of the S60 platform including loading, saving and resizing of images.
Messaging, which provides access to the messaging capabilities of the S60. It includes SMS and MMS services.
The inbox module, which allows one to access the inbox of the mobile on which the application is being executed. The information one can access includes the message, time of message, the address of the sender and so forth.
The camera module, which grants access to all the functionalities of the camera. This includes image modes, flash modes, maximum zoom available, and so on.
The audio extension, which provides access to the audio capabilities of the device. The functionalities include playback of different formats of audio files, recording of voice, text to speech and so on.
The calendar module, for using the calendar functionalities of the device.
The contacts module, through which one can access the contact list in a device. The contacts are provided in the form of dictionary.
That completes the services provided by PyS60. Next, let us see the steps in accessing the different services of the mobile using Python.