GWT Hello World in Python
Eventually, pyjamas has reached the first milestone to write Hello World example in Python and then translate them to JavaScript and HTML. Note that it also supports event handling. Let’s see how it looks like in action.
from ui import Button, RootPanel
import Window
def greet(sender):
Window.alert("Hello, AJAX!")
class Hello:
def onModuleLoad(self):
b = Button("Click me", greet)
RootPanel().add(b)
Great! In order to produce JavaScript and HTML, you have to get the whole source tree at http://pyworks.org/svn/py-gwt/trunk/ and run build.py in helloworld directory as follow.
python ../../builder/build.py Hello
Thanks James Tauber for this nice job.
Technorati Tags: Development, Announcement, English, HTML, JavaScript, Programming, Python, Tips and Tricks, , GWT, Pyjamas, AJAX
- sugree's blog
- 1266 reads
Recent comments
2 years 11 weeks ago
2 years 15 weeks ago
2 years 16 weeks ago
2 years 16 weeks ago
2 years 17 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 19 weeks ago
2 years 20 weeks ago