All About Symbian - Nokia (S60) and Sony Ericsson (UIQ) smartphones unwrapped

  #1  
Old 15-11-2007, 09:38 AM
slitchfield slitchfield is offline
Administrator
 
Join Date: Nov 2002
Posts: 6,054
slitchfield is on a distinguished road
Programming your smartphone: Mobile Python

As something of a dabbler in PyS60, Nokia's open source port of the Python programming language to S60, I was excited to see the arrival of a proper book on the subject. "Mobile Python" takes a tutorial approach, leading you from the ubiquitous 'Hello World' right through to phone-controlled robotics and multi-player online games. It's a heady and sometimes uneven ride, but Mobile Python does manage to get across a lot of information while simultaneously firing the imagination of anyone who ever wanted to write an application for their S60 phone.

Read on in the full article.
Reply With Quote

  #2  
Old 15-11-2007, 05:19 PM
Unregistered
Guest
 
Posts: n/a
Accelerometer module for PyS60

This book looks very interesting and I will probably buy it, but I was wondering if someone familiar with PyS60 knew if it has a module to aid in using the accelerometer for an appication.
Reply With Quote

  #3  
Old 15-11-2007, 07:09 PM
slitchfield slitchfield is offline
Administrator
 
Join Date: Nov 2002
Posts: 6,054
slitchfield is on a distinguished road
There isn't a module for this yet, but I'd place good money on it arriving in due course....
__________________
Steve Litchfield, Admin, AAS
Reply With Quote

  #4  
Old 15-11-2007, 11:21 PM
Unregistered
Guest
 
Posts: n/a
Does anyone know if it's actually possible to develop/code directly on a nokia S60 phone? Rather writing and compiling on a desktop PC.
Using a fold out bluetooth keyboard, and your phone, can you program on the go?
there are a few packages available for PocketPC development on the device itself, it would be great if there was something like this on the nokia's.
Reply With Quote

  #5  
Old 16-11-2007, 12:49 AM
Unregistered
Guest
 
Posts: n/a
I do code editing on the go in Python. The Python for S60 implementation runs Python code against the run time interpreter. You just need something to edit the .py files on the phone. Luckily, someone has done a Python indenting editor for S60 called PED.

Try this: http://discussion.forum.nokia.com/fo...d.php?t=108617

http://homepage.rub.de/Arkadiusz.Wahlig/Ped/

Last edited by slitchfield; 16-11-2007 at 07:29 AM.
Reply With Quote

  #6  
Old 16-11-2007, 09:35 AM
Unregistered
Guest
 
Posts: n/a
Thumbs up aXYZ module is the solution in PyS60

You are asking for AccelerometerPlugin for PyS60 ?
Nokia has published the sensor module for using accelerometer from Python since 16 October 2007 (before the buzz about accelerators in N95 !) but it works actually with the following models : N82 , 5500 , N95 8GB , N93i 20.0.084 (XYZ axes)
N95 classic (only with X and only 4 values : right , left , top , bottom) like RotateMe from Samir


For full support for this one you have to use AcceleratorPlugin from NRC plus the aXYZ module (that I have developped since 13 November 2007 (before you wrote this article :-) More than 70 downloading in 3 days !
You can download it at sourceforge search about pyed or search discussion about aXYZ on the Python Forum Nokia DiBO
You can ie use your N95 for making Lightsaber in PyS60 and look at Cube example
at the DiBo

Sorry I can post links because I haven't got enough posts (10) :(

Cyke64
Reply With Quote

  #7  
Old 16-11-2007, 09:50 AM
Unregistered
Guest
 
Posts: n/a
Yes, I've written quite a bit of Python on my N93, you just need a good editor, such as EasyEdit, and a copy of the API doc in a useful format (mobipocket for example). As Steve said, Python might be quite intimidating at first for people from a C/Basic/OPL) background, and I found the best way was to start from a working example and tweak it bit by bit. The ease of internet connectivity alone pays its bus fare - http post/get is simple, for example, so if you have a monster server sitting at home you can use it for beefy processing effort, bulk storage and serving up files in convenient formats, etc.

BTW the callback to detect the auto-rotation of the screen on the N93 when you do the old Rubik's Cube maneouvre doesn't seem to work, you have to poll for it instead.
Reply With Quote

  #8  
Old 16-11-2007, 10:30 AM
jukkaeklund jukkaeklund is offline
Registered User
 
Join Date: Mar 2006
Posts: 86
jukkaeklund is on a distinguished road
In case you want have a web server in the phone to serve Python stuff, you know where to find it
Reply With Quote

  #9  
Old 16-11-2007, 11:18 AM
cyke64 cyke64 is offline
Registered User
 
Join Date: Dec 2006
Posts: 10
cyke64 is on a distinguished road
Quote:
Originally Posted by Unregistered View Post
Yes, I've written quite a bit of Python on my N93, you just need a good editor, such as EasyEdit, and a copy of the API doc in a useful format (mobipocket for example). As Steve said, Python might be quite intimidating at first for people from a C/Basic/OPL) background, and I found the best way was to start from a working example and tweak it bit by bit. The ease of internet connectivity alone pays its bus fare - http post/get is simple, for example, so if you have a monster server sitting at home you can use it for beefy processing effort, bulk storage and serving up files in convenient formats, etc.

BTW the callback to detect the auto-rotation of the screen on the N93 when you do the old Rubik's Cube maneouvre doesn't seem to work, you have to poll for it instead.
What do you mean by poll it ?

Cyke64
Reply With Quote

  #10  
Old 16-11-2007, 12:55 PM
pintofale pintofale is offline
Registered User
 
Join Date: Sep 2005
Posts: 54
pintofale is on a distinguished road
@cyke64

By 'poll' I mean check the 'size' method of your 'canvas' to see if it's (320,240) or (240,320). This is fine if you're constantly refreshing the screen, like Nokia do in their 'ball' example.

I did notice some other sizes but I think this is do do with a delay between re-orienting the screen and switching (back) to 'full screen' mode, which is a python VM problem and not visually noticeable.
Reply With Quote
Ads
Reply

Bookmarks

Tags
mobile, programming, python, smartphone

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobile Podcasting MobileMonte Introductions 2 18-01-2008 10:57 AM
N-Gage 'Platform' To Expand Over Nokia's Smartphone Range Ewan N-Gage 17 15-11-2005 07:52 AM
Mobile Broadcast Charter Agreed By Manufacturers Ewan Links of Interest 0 10-09-2004 07:26 AM



All times are GMT. The time now is 04:15 AM.


vBulletin skins developed by: eXtremepixels
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright Notes || Contact Us || Privacy Policy