📜 ⬆️ ⬇️

Python for S60 based smartphones: the beginning

image
I decided to write a series of articles about writing programs in Python for Nokia smartphones based on Symbian S60.
Python for S60 (or PyS60 for short) is Nokia’s open source project to port Python to smartphones running on the S60 platform. It provides all the features of the Python language as well as access to phone-specific functions, such as: work with the camera, calendar, phone book, GPS, record and play audio and video, transfer data via Bluetooth, WiFi and GPRS.
PyS60 is an open source project and is distributed under the Apache 2 and Python licenses. At the time of this writing, the latest version 1.9.1
So, let's begin!

First, install Python on our smartphone (it is also possible to install it on the S60 emulator)


Before installation, we need to know the operating system version of our smartphone, since different versions of the system require different versions of Python. To do this, go here , find your phone model in the table and look in the first column for the name (for example, I have “S60 3rd Edition, Feature Pack 2”):
For installation we will need 2 packages:


After that, we upload both files to the phone in any way you like and first install PythonForS60 and then PythonScriptShell

After installation, a Python folder will be created on the phone's memory card (if for some reason it was not created, you can create it yourself), in which all our .py files will be stored.
')
If an error about the Python Runtime and PIPS Library error occurs, see the solution at the end of the topic.

After successful installation, the Python icon appears in the phone’s menu.

Python itself meets us with information about the installed version.


image

After pressing the left soft key, a list of possible operations will be displayed. Here you can call pre-installed scripts, or call an interactive console, which we will do. Here you can play a little with the output on the screen.


image

Interactive console allows you to write and whole scripts, unless of course you are comfortable typing them on the phone keypad.


image

Also, the interactive console successfully copes with mathematical expressions, which allows using it as a convenient calculator.


image

Pre-installed scripts reveal some of the features of the PyS60. Here are some of them:

In the following articles I will look at how to create the simplest programs on the PyS60 for solving various tasks: a file manager, working with an integrated camera, viewing and processing images, and much more.

upd: since the site has blogs dedicated to Symbian or Python could not choose which one to transfer the topic to and decided to create a new blog “Python for S60”

upd2: if during installation you get an error about the absence of the Python Runtime and PIPS Library :

then install Python as described above.

Source: https://habr.com/ru/post/53106/


All Articles