Python Framework for Symbian Series 60 phones

Wednesday 25 April 2007

Journal

The thesis comes to its end. Last Friday I presented my working in front of a full room at university, which is not that common and it cheered me up :) So if one you you guys that were there read this, thanks again for coming! I should get photographs and maybe also the video of it if it not too bad ;)

I added today some screen shots of the mobile client to give you an idea of the final beta product that work on 2nd and 3rd edition devices (tested on Nokia 6600 and N93).

So I'm now trying to terminated the thesis report as soon as possible. If agreed with my laboratory, I'll try to publish the report as well.

Client screenshots

Public services which do not require authentication

  • Launch application:

    mainPane.png rightarrow.png runScript.png rightarrow.png runScript2.png rightarrow.png splashScreen.png rightarrow.png
    getServices.png      
  • Services list:

    services.png
  • Services menu:

    mainMenu.png
    downarrow.png
    logout.png setLanguage.png aboutScreen.png
    downarrow.png    
    loggedOut.png    
  • Text services:

  • Product services:



MyArticles

  • Login procedure:

    loginNote.png rightarrow.png loginUserName.png rightarrow.png loginPassword.png rightarrow.png loginConfirmation.png
  • Articles list:

    productListbox.png
    MyArticlesNoImageMenu.png myArticlesMenu.png
  • Add article:

    MyArticlesNewProduct.png rightarrow.png MyArticlesAritcleAdded.png
  • Modify article:

    MyArticleModifyArticle.png
  • Delete article:

    MyArticlesDeleteQuery.png rightarrow.png MyArticlesProductDeleted.png
  • Camera (key binding: select and 5 for capturing, 1 starts the viewfinder, # uploads, 3 stops the view finder ):

    Camera.png CameraMainMenu.png CameraViewFinderOn.png CameraViewFinderStopped.png
    CameraCaptured.png CameraCapturedMenu.png CameraUploading.png CameraPictureAdded.png
    CameraPictureAdded.png      

Sunday 8 April 2007

Compile PyS60 script to bytecode

Follow the previous post instructions if you don't have Python 2.2.2 installed on your system.

import py_compile
 
py_compile.compile("mymodule.py")

Compile your PyS60 library to bytecode

First of all you need to install python 2.2.2 on your machine. It can be downloaded at http://www.python.org/download/releases/2.2.2/

I kept the installation folder by default (C:\>Python22) in order not to interfere with my current Python 2.5 installation (installed in C:\>Python).

Then

  • go to C:\Python22>
  • type python and you should have the following output:
Python 2.2.2 (#37, Oct 14 2002, 17:02:34) \[MSC 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

All you have left to do is:

import compileall
 
compileall.compile_dir("myLibDirectory", force=1)

Friday 6 April 2007

Journal

The user administration on the phone works now and is ready. For this I had to create a list box for displaying the products:

productListbox

I had to make some modifications on the list base class which will be documented soon in the new documentation version.

I had difficulties with the server side that for some reason send UTF-8 or ISO-8859-1 randomly on request response. It broke the XML parsing, so some more verifications where needed from that side.

I also lost much time debugging the jsp services with Jori. The port from Linux to Windows 2000 added lots of errors that mostly where calling executable with wrong path for resizing pictures for example, wrong URL printed on the XML files, wrong XML tag given in the documentation...

Now on the client side I had to recode some part also. After solving the encoding problem I had difficulties to send too long requests with HTTPConnection object. The work around is to create a temporary XML files on the RAM disk and then upload this XML file for each request. Since the file data is sent as base64 string, it fixes all encoding problem and request length difficulties.


I had to recode the previous public part, i.e: the list of services where you don't need to login. It was working but let say that it was kind of a spaghetti design. The good point of taking Symbian C++ course is that you have to stick on designing method and it finally simplify the task quite much. I now try to stick as much as I can on MVC (Model View Controller) design for the classes. It is not always possible to perfectly stick on it but... try the best. Here is a picture from Wikipedia:

MVC diagram

I'm now about to terminate the programming part of the project. I just have to do some more hand user testing and catch/reproduce some different scenario cases that could shout errors and/or freeze the application, like network loss...

LEFEVRE Damien
http://www.lfdm.net
contact@lfdm.net