Archive for August, 2008

Aug

30

Making time limited calls using pys60

By diego

Enter telephone number and duration in seconds.

import telephone, e32, appuifw
 
number = appuifw.query(u"number", "number")
duration = appuifw.query(u"duration", "number")
telephone.dial(str(number))
 
def handle_hang_up(status):
if status[0] == telephone.EStatusConnected:
e32.ao_sleep(float(duration), telephone.hang_up)
 
telephone.call_state(handle_hang_up)

Aug

29

Getting Routs

By souto

This example shows, using a gmaps feature, how to get rout from a place to another in Python for s60. You can submit two locations or two GPS coordinates and get the rout.

#routs.py
 
import urllib
from html_parser import *
 
def parser_html(start,end):
rout_link = "http://www.google.com.br/maps?site=local&
[...]

Aug

8

SOAPpy for s60

By souto

Here is the package of SOAPpy for s60.
A quick explanation of how the porting was made.
And finally a small example of a calculator using the mobile as a client and a server at PC.

#SOAPcalculator.py
 
import SOAPpy
 
calculator = SOAPpy.SOAPProxy("http://localhost:8080/")
 
a = 8
b = 2
 
print calculator.plus(a,b)
print calculator.minus(a,b)
print calculator.multiply(a,b)
print calculator.divide(a,b)

#Server.py
 
import SOAPpy
 
class Calculator:
 
def plus(self, a, b):
[...]

Aug

4

Here is a basic canvas application

By admin

Here is a basic canvas application in pys60, published on wiki.forum.nokia.com

import appuifw
import sysinfo
import graphics
import e32
 
class Basic:
def __init__(self):
appuifw.app.screen = ‘full’
self.display_size = sysinfo.display_pixels()
self.img = graphics.Image.new(self.display_size)
[...]