/examples/helloworld/Hello.py

http://pyjamas.googlecode.com/ · Python · 10 lines · 8 code · 2 blank · 0 comment · 0 complexity · 96e29a90a069e53ff67790b1c02187cb MD5 · raw file

  1. from ui import Button, RootPanel
  2. import Window
  3. def greet(sender):
  4. Window.alert("Hello, AJAX!")
  5. class Hello:
  6. def onModuleLoad(self):
  7. b = Button("Click me", greet)
  8. RootPanel().add(b)