A good short demo for pys60.
1
2
3
4
5 from appuifw import *
6 import e32
7 from random import randrange
8
9 running = 1
10 def quit():
11 global running
12 running = 0
13 app.exit_key_handler = quit
14
15 app.screen = 'large'
16 app.body = canvas = Canvas()
17 res_x, res_y = canvas.size
18
19 while running:
20 x1 = randrange(res_x)
21 x2 = randrange(x1, res_x)
22 y1 = randrange(res_y)
23 y2 = randrange(y1, res_y)
24 color = randrange(0xffffff)
25 canvas.rectangle((x1, y1, x2, y2), fill=color)
26 e32.ao_yield()