Skip to content

Commit

Permalink
Create hello_world_v2.py
Browse files Browse the repository at this point in the history
  • Loading branch information
humberry committed Aug 7, 2014
1 parent 50659a1 commit 062f5c5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions hello_world_v2.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# coding: utf-8

import ui, time

def change_label(label):
if label.text == 'Hello':
label.text = 'World'
else:
label.text = 'Hello'

view = ui.load_view('hello_world_v2')
my_label = view['label1']
view.present('fullscreen')

while True:
time.sleep(1)
change_label(my_label)

0 comments on commit 062f5c5

Please sign in to comment.