Presentation is loading. Please wait.

Presentation is loading. Please wait.

Python for S60 SmartPhones PostPC Workshop Fall 2006 Amnon Dekel.

Similar presentations


Presentation on theme: "Python for S60 SmartPhones PostPC Workshop Fall 2006 Amnon Dekel."— Presentation transcript:

1 Python for S60 SmartPhones PostPC Workshop Fall 2006 Amnon Dekel

2 S60? What? 2 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

3 What is Python  Python is an Open Source programming language developed by Guido van Rossum Python  Python is an interpreted, interactive, object- oriented programming language. It is often compared to Tcl, Perl, Scheme or Java. The popularity of Python is on the rise.  Python combines remarkable power with very clear syntax. It has modules, classes, exceptions, very high level dynamic data types, and dynamic typing. From: Python Tutorial: Jurgen Scheible (c) 2006 3 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

4 Who Uses Python?  Google  NASA  Industrial Light and Magic  Many more  www.python.org 4 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

5 Python for S60  Python for Series 60 brings the Python programming language to the Series 60 Platform, Nokia's "modified/enhanced" version of the Symbian Operating System platform for Mobile devices. Python for Series 60  Currently Python for Series 60 is based on Python 2.2.2.  It Supports many of the Python Standard Library modules but has on top a few mobile platform specific modules e.g. - native GUI widgets, - Bluetooth - GPRS networking - GSM Location information, - SMS Messaging, - Acces to camera and more! 5 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006 From: Python Tutorial: Jurgen Scheible (c) 2006

6 Python for S60 - Capabilities  GUI: Menu, Forms, Listboxes, Input fields, Dialogs, Notes  Graphics: - color, font and style attributes, - direct- screen drawing, - displaying images and icons Key- down and key-up events  Sockets: TCP/IP, Bluetooth (RFCOMM, OBEX)  Messaging (SMS)  Networking (HTTP, FTP, …)  Access to file system, file reading, XML, RSS  Access to camera, telephone  Access to calendar, contacts, sysinfo  Location (cell-id)  Content handler  Python extensions can be written in C++  Make standalone applications 6 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006 From: Python Tutorial: Jurgen Scheible (c) 2006

7 Python for S60 - Installing 1. Determine the Phone Version: S60 1 st Edition, 2 nd Edition, 2 nd Edition FP2, 2 nd Edition FP3, 3 rd Edition Search for your phone model here: http://en.wikipedia.org/wiki/Nokia_S60_and_Symbian_OS http://en.wikipedia.org/wiki/Nokia_S60_and_Symbian_OS  Our Phones: 6680: Series 60 2nd Edition, Feature Pack 2 (Version 2.6), based on Symbian OS version 8.0a N80: S60 3rd Edition (Version 3.0), based on Symbian OS version 9.1 7 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

8 Python for S60 - Installing 1. Download and Install Python S60: http://sourceforge.net/project/showfiles.php?group_id=154155 http://sourceforge.net/project/showfiles.php?group_id=154155  Find the installer for the phone Install first the PythonForS60 package and then the PythonScriptShell package. More Installation Info 8 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

9 Other Files and Documents  File Manager:  FExplorer for Series 60 FExplorer for Series 60  SExplorer for Series 60 3 rd Edition SExplorer for Series 60 3 rd Edition  Documentation:  PythonForS60_doc_1_3_1.pdf It is a helpful documentation on Python for Series 60 API's. PythonForS60_doc_1_3_1.pdf  Python Library Refernence (2.2.3) It is useful for checking out standard Python stuff. Python Library Refernence (2.2.3)  Other documents:  Programming_with_Python.pdf Programming_with_Python.pdf  Getting_Started_with_Python.pdf Getting_Started_with_Python.pdf 9 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006 From: Python Tutorial: Jurgen Scheible (c) 2006

10 Links  The Tutorial: http://www.mobilenin.com/pys60/menu.htm http://www.mobilenin.com/pys60/menu.htm  Code Snippets: http://www.bigbold.com/snippets/tag/series60 http://www.bigbold.com/snippets/tag/series60  Python.org: Download Python + IDE’s for your workstation  Python for S60 Discussion Board: http://discussion.forum.nokia.com/forum/forumdisplay.php?f =102 (this is where to find the latest releases and updates) http://discussion.forum.nokia.com/forum/forumdisplay.php?f =102  Python for S60 WIKI: http://wiki.opensource.nokia.com/projects/Python_for_S60 http://wiki.opensource.nokia.com/projects/Python_for_S60  Python for S60 Emulator:Emulator 10 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

11 Hello World  OK- we have installed Python S60 on our Phones – Now lets get to Hello World 11 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

12 Hello World 1. Write your script in a text editor on your workstation 2. Save it as filenaeme.py 3. Transfer it to your phone and run it 12 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

13 Hello World  Write your script in a text editor on your workstation 13 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006 From: Python Tutorial: Jurgen Scheible (c) 2006

14 Hello World  Save it as filenaeme.py 14 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

15 Hello World  Transfer it to your phone:  Install Nokia PC Sync  http://europe.nokia.com/A4144903 http://europe.nokia.com/A4144903 15 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

16 Hello World  Transfer it to your phone:  Install Nokia PC Sync  http://europe.nokia.com/A4144903 http://europe.nokia.com/A4144903 16 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

17 Hello World  Transfer it to your phone 17 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

18 Hello World  6680: Open FExplorer on the phone Navigate to the Directory where you saved the file 18 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

19 Hello World  N80: Open SExplorer on the phone Select the 3 rd Shortcut on the Standby Menu 19 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

20 Hello World  Run Python on the Phone 20 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006

21 Lets Try  Write the Hello world code  Save to disk  Transfer to Phone  Install: 6680: Install as Python Script N80: Copy and Paste into C:\Python\  Run in Python for S60 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006 21

22 Homework  Go through the Python for S60 TutorialTutorial Do the exercises in the tutorial  Write an app that uses the following: Reads User input Outputs user input to screen Menu Record Audio, Play back Audio Snap Photo, Show Photo, Upload* photo to web page If you have a 3G SIM* (insert and use in the phone)  Send an SMS to user supplied number with URL to The web page with the photo (so they can see it on their phone – make sure the image is not too large) Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006 22

23 Phone Usage  We have 2 Phones for your use  They will be available for use in the Lab (Ross 19) (They must NOT be taken out)  They must be signed out with your student or ID card  There is the option of using an Emulator* *: I have not done this – you are on your own Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006 23 http://wiki.opensource.nokia.com/projects/ Installing_PyS60#Emulator_installation

24 Contacting Me  amnoid @ cs 24 Python for S60 Workshop -- Amnon Dekel – HUJI Nov 2006


Download ppt "Python for S60 SmartPhones PostPC Workshop Fall 2006 Amnon Dekel."

Similar presentations


Ads by Google