Skip to content. | Skip to navigation

Personal tools


You are here: Home / Members / jhb / pys60 / developing on ubuntu with python for s60

developing on ubuntu with python for s60

by Jörg Baach last modified May 05, 2009 01:59 PM
some things I find out while I go along


Packaging a standalone app with libraries using

Having downloaded pys60 1.9.4 I wondered how to create a standalone app that uses a library. I have read the documentation (section 7 ) and their announcement, and I got a bit confused at first. But now, having had a closer look at it, its all so simple. Lets take the example of packing up my ocwallet (a wallet for

One needs to differentiate between the app itself, and the libraries that it might include

The app itself will either go in a directory, with the file to be run called, or one just leaves the file alone. I do the second, just have a file called

The library to include is called oc2. This goes into PythonForS60/module-repo/dev-modules :

cd ~/software/PythonForS60/module-repo/dev-modules
mkdir oc2
cd oc2
ln -s ~/projects/opencoin/opencoin/trunk/sandbox/jhb/oc2 .
echo "{'type': 'repo',  'deps': ['socket','btsocket']}" > module_config.cfg

This creates the dev-module named 'oc2', with the actually library symlinked within this directory, and a module_config.cfg file that declares the dependencies.

This library gets include'd in my file. seems to look for the imports, and automatically includes the oc2 library in the sis that it generates:

cd ~/software/PythonForS60
ln -s ~/projects/opencoin/opencoin/trunk/sandbox/jhb/mobile/ .
python py2sis -H 2M

The -H 2M tells the mobile that my app needs to 2 Megabytes.


Browse my mobile phone via bluetooth

 So far I have always manually used obexftp to send files to my mobile. Today I came across the right click on my bluetooth icon:

Right clicking the ubuntu symbol


This will allow me to select my mobile phone, and suddenly nautilus gets my mobile phone. Great.


Using bluetooth console

Nothing new (to everybody besides me), all described on the nokia wiki, but for me to copy+pase:

sdptool add --channel=2 SP
rfcomm listen rfcomm2 2

[now start bluetooth console from the menu in the Python Scriptshell)

and in new console

cu -l /dev/rfcomm2


Add comment

You can add a comment by filling out the form below. Plain text formatting.

Question: What is 6 times 7?
Your answer: