Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Archived:Basic PySymbian application - series1

From Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

Article Metadata
Created: gaba88 (17 Jul 2008)
Last edited: hamishwillee (31 May 2013)



Mobile applications we know are very interesting and attractive. This article series will help a beginner to develop a good mobile application using the Python for the S60 platform.

The first series will make us understand the structure of an application. A good mobile application developer must have a clear vision about the application structure s/he wants to design.

Application Structure

The figure below tells us about the application structure of a PySymbian application. A good developer at the time of designing a application should always keep this application structure in mind and should try to port his application according to the figure below.

Appli struct.jpg


The figure above tells most part of the story, and we will also make lesson out of it.

  • At the top of the figure you can see the application title. That's the portion of our application one should set the title. In PySymbian, we can set the title by using. = u"My First App"
  • The navigation tabs are below the title. If you would like to use tabs in your application, look here.


Below navigation tabs comes the body of the application, which is indeed the most important part of the application. In PySymbian, basically four kinds of objects can be assigned to the body part:

  • A canvas that handles graphics on screen.
  • A form that is used to built a complex forms that include combination of various fields such as text numbers and lists.
  • A text object that handles a free form text input.
  • A listbox that shows a list of items with


Inside the body of the application we can see a dialog window. In a dialog window we can handle the application input and output. In PySymbian we have queries, notes and much more. Below is a code example.


Menu & Exit

After every thing there leaves the two important aspects in our application they are

Access To The Left Soft Key

Access To The Right Soft Key

We can use the the left soft key in our application to access the options or the application menus. In PySymbian, we can do as following:[(u"menu1",callback_1),

The right soft key in our Python application is used to exit our application. In PySymbian, we can do it as:

appuifw.exit_key_handler = function

where function is a callback function that is called when the left key is pressed.

Helpful Links

This page was last modified on 31 May 2013, at 01:06.
29 page views in the last 30 days.