Writing a simple script

The following example shows how to write a simple “Hello World!” Python script.  The example uses a Python for Series 60 module named "appuifw"

For more information about it, see Python for Series 60 Platform API Reference (http://kom.aau.dk/project/mobilephone/Python/API_Reference_for_Python.pdf).

  1. Open a text editor.
  2. Write the following lines (the first line is a comment):
  3. Save the file as hello.py
# Hello
from appuifw import *
note(u"Hello World!", "info")

Running a Python script on the emulator

This guide and the related screenshots,  refers to the Python For Series60 for 2nd Ed FP2.

To run a Python script on the Nokia Series 60 SDK emulator it is necessary to follow the following steps:

  1. Save the hello.py file in the folder: <EPOCROOT>\Epoc32\Release\wins\udeb\z\system\apps\PYTHON
  2. Start the Nokia Series 60 SDK emulator (see Figure below)
  3. Select the Python icon and click on it
  4. Click on “Select->Run script
  5. Click on hello.py

The below figure shows the screen shots of all the steps

Opening Nokia emulator

Department of Electronic Systems | Aalborg University | Niels Jernes Vej 12 | DK-9220 Aalborg | Denmark
Phone: (+45) 9635 8695 | Fax (+45) 9815 1583 | E-mail ies(at)ies.aau.dk
Copyright © 2006 Department of Electronic Systems

Last update:09-10-2006