Twisted

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
第2行: 第2行:
  
 
[[Image:twisted-overview.png|thumb|right|High-Level Overview of Twisted]]
 
[[Image:twisted-overview.png|thumb|right|High-Level Overview of Twisted]]
==Install==
+
==Guide==
 
  http://twistedmatrix.com/trac/wiki/Downloads
 
  http://twistedmatrix.com/trac/wiki/Downloads
 
   
 
   
 +
>>> from twisted.web.client import getPage
 +
>>> from twisted.internet import reactor
 +
>>> def printContents(contents):
 +
print "The Deferred has called printContents with the following contents:"
 +
print contents
 +
reactor.stop()
 +
>>> deferred = getPage('http://www.huihoo.com/')
 +
>>> deferred.addCallback(printContents)
 +
<Deferred at 0xb9afd0>
 +
>>> reactor.run()
 
*http://twistedmatrix.com
 
*http://twistedmatrix.com
 
*下载 - http://download.huihoo.com/python/framework/twisted/
 
*下载 - http://download.huihoo.com/python/framework/twisted/

2007年2月21日 (三) 13:40的版本

Twisted is an event-driven networking framework written in Python and licensed under the MIT license.

High-Level Overview of Twisted

Guide

http://twistedmatrix.com/trac/wiki/Downloads

>>> from twisted.web.client import getPage
>>> from twisted.internet import reactor
>>> def printContents(contents):

print "The Deferred has called printContents with the following contents:" print contents reactor.stop()

>>> deferred = getPage('http://www.huihoo.com/')
>>> deferred.addCallback(printContents)
<Deferred at 0xb9afd0>
>>> reactor.run()
分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱