Python Framework for Symbian Series 60 phones

Friday 12 January 2007

Journal

Yesterday a new beta release PyS60 was released. One of the most wished functions (camera.start_finder, camera.stop_finder) were added. I quickly recoded the API camera class. The image is as fluent as a C++ application! I'm just searching now a way to set flash, zoom, exposure, white balance, position controls like it used to be in take_photo.

I'll check the doc to see if any significant enhancement would be valuable for the framework.

I also started to work on the thesis report and succeed to set up a LaTeX environment. I'm training with the syntax and decided to use LaTeX to write my report. This language has serious advantages and will make me save some precious time.

Use of view finder

# Copyright (c) 2007 LEFEVRE Damien
# Camera application
 
# use the options key to select Start, Stop, Capture, Save and Exit functions
 
import appuifw, e32, camera
 
SCRIPT_LOCK = e32.Ao_lock( )
IMG = None
 
def __exit__( ):
  stop( )
  SCRIPT_LOCK.signal( )
 
def start( ):
    camera.start_finder( vfCallback )
    appuifw.app.menu = [(u'Capture', capture), (u'Stop', stop), (u'Exit', __exit__)]
 
def stop( ):
    camera.stop_finder( )
    cnvCallback( )
    appuifw.app.menu = [(u'Start', start), (u'Save', capture), (u'Exit', __exit__)]
 
def vfCallback( aIm ):
    global IMG
    appuifw.app.body.blit( aIm )
    IMG = aIm
 
def cnvCallback( aRect=None ):
    if IMG != None:
        appuifw.app.body.clear( )
        appuifw.app.body.blit( IMG )
 
def capture( ):
    camera.stop_finder( )
    cnvCallback( )
    appuifw.app.menu = [(u'Start', start), (u'Exit', __exit__)]
    if e32.in_emulator( ):
        IMG.save(u'C:\\Images\\viewfinder.png')
    else:
        IMG.save(u'E:\\Images\\viewfinder.png')
    appuifw.note(u'Saved', 'info')
 
 
appuifw.app.exit_key_handler = __exit__
appuifw.app.title= u'PyS60 ViewFinder'
appuifw.app.body = appuifw.Canvas( redraw_callback = cnvCallback)
start( )
 
SCRIPT_LOCK.wait( )

Friday 5 January 2007

Journal

For the last month, I finished implementing the UI and create the new lists needed for the product services. I also went further in the API by creating new classes for retrieving data from the server like files... There is now a download and a memory manager to get the data with keeping an eye on the available resources.

Christmas holidays and the last few days have been spent by documenting the code and testing it on a NOKIA 6600 and the 2nd edition SDK.

There is a little break in the development because the server as been down for 2 weeks now. I'm hoping to have it working next week to test the product services and start coding the user interface.

Also I took the decision to share the UI modules since some guys where interested in and it doesn't reveal anything about the server. Let see if I get some feedbacks, maybe ideas to make it better... Who knows! I also compiled a separated doc for the UI modules shared (I couldn't share them all).

I should start writing the report any soon after checking the UML sheets and update them with some new content.

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