一个python 的AJX 东东!
2009-05-13 05:35:12来源:未知 阅读 ()
网站是:
http://pyjamas.pyworks.org/
Many people, when first finding out about
Google Web Toolkit
, wonder "why can't I use Python instead of Java?". pyjamas is designed to make that possible. And we're drawing heavily from Google's work.
It's in its early stages but I invite anyone who is interested to join the mailing list and check out what's in the Subversion repository.
You'll see py-gwt referenced. That's just because that's what I was calling it before a better name came along. jorjun came up with pyjamas. We're still working on backworking an acronym for it that I like :-)
Download
Trac
Mailing list
Subversion Repository
Examples
- IRC: #pyjamas on freenode
for django :
Using pyjams with Django is very straightforward, this is how I did it.
PyJamas code for the UI:
from ui import RootPanel, TextArea, Label, Button, HTML, VerticalPanel
from JSONService import JSONProxy
class DjangoTest:
def onModuleLoad(self):
self.TEXT_WAITING = "Waiting for response..."
self.TEXT_ERROR = "Server Error"
self.remote = EchoService()
self.status=Label()
self.text_area = TextArea()
self.button = Button("Send text to Echo Service", self)
self.button2 = Button("Send text to Echo Service 2", self)
panel = VerticalPanel()
panel.add(HTML("JSON-RPC Example"))
panel.add(self.text_area)
panel.add(self.button)
panel.add(self.button2)
panel.add(self.status)
RootPanel().add(panel)
def onClick(self, sender):
self.status.setText(self.TEXT_WAITING)
if sender == self.button:
id = self.remote.echo(self.text_area.getText(), self)
else:
id = self.remote.echo2(self.text_area.getText(), self)
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- (已解决)VM里面的OpenBSD怎么删除一个新添加的硬盘? 2009-05-13
- 见笑了,问一个很简单的问题 2009-05-13
- adsl+openvpn的一些问题 2009-05-13
- 升级FreeBSD7.0到7.1的方法 2009-05-13
- [FreeBSD] 添加一个分区 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash