Archived:PySymbian Hello World
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
Code Example
Article
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
| Getting Started with Python > Download & Install > Archived:PySymbian Hello World > Archived:PySymbian Application Packaging & Distribution | |
This article shows how to create and test a basic Python "Hello World" application The very simple Python script below asks the user for their name, then displays a dialog with the text: "Hello Name, welcome to Python World."
# import the app user interface framework module
import appuifw
# create a single-field dialog (text input field): appuifw.query(label, type)
data = appuifw.query(u"Type your name", "text")
# create an information note: appuifw.note(label, type)
appuifw.note(u"Hello "+str(data)+", welcome to Python World", "info")
Copy this text into your preferred text editor and then save the file as Helloworld.py (the ".py" extension is used for uncompiled python scripts).
If you're using the interactive shell for testing, you need to copy the file to \Data\Python\ on any drive:
- For the device you can copy the file directly into the correct folder using PC Suite, or send it as a message with Bluetooth and then move it to the correct folder, using a File manager application.
- If you're using the emulator you can copy it direct into the appropriate folder - [SDK]/epoc32/winscw/c/data/python.
To test your script first launch the "Python2.0.0" icon for the interactive shell, then do "Options | Run Script" and select it from the list.
That's it. You've now created and launched a basic script. The next topic in this trail shows how you can package your script as an application.
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
| Getting Started with Python > Download & Install > Archived:PySymbian Hello World > Archived:PySymbian Application Packaging & Distribution | |
Note that this content was originally hosted on the Symbian Foundation developer wiki.



(no comments yet)