ChinaUnix.net
相关文章推荐:

twisted ftp

有人对twisted比较熟吗?:shock:

by sunorr - Python - 2008-08-25 23:33:14 阅读(2048) 回复(9)

相关讨论

开发一个twisted应用,实质上会关注三个层次的对象。它们互相可配置,可独立开发,只需要通过简单的调用配置就可结合使用。第一层次就是侦听的建立、工厂的初始化、服务器的运行,它需要reactor(反应堆)的开发。第二个层次就是服务的初始化、用户连接的建立、持久配置数据的存储、协议的实例化,它需要factory(工厂)的开发。第三个层次就是用户连接建立后的事件处理,这就需要protocol(协议)的开发了。 建立服务器的第一个要...

by honglang13 - Python文档中心 - 2009-06-01 22:27:09 阅读(1765) 回复(0)

小弟正在给自己单位写一个icap server 采用了twisted,但因为twisted是单线程的,不知道性能怎么样,有没有专门的评测什么的呢 我想知道的是 比如 twisted能处理request/sec 的最大能力是什么样的呢 谢谢

by gm3000 - Python - 2009-06-24 22:21:52 阅读(3674) 回复(6)

twisted netclient 学习twisted,尝试使用task和struct,接收类似下列消息 struct MSG_HEAD{ word msgLen; word msgType; byte source; byte receive; }; struct MSG_111:MSG_HEAD{ }; 不知是否有更合适的方法,初次用python编写16进制数据收发,总觉的不确定。 from twisted.internet.protocol import ClientFactory from twisted.protocols.basic import LineReceiver from twisted.internet...

by yuntinghill - Python文档中心 - 2008-04-17 00:32:43 阅读(1555) 回复(0)

是否: twisted 能做的,Django 未必做得到 ?? Django 能做的, twisted 也能做到.?? 用 twisted 來做 web 好嗎??

by eookoo - Python - 2007-03-21 16:30:46 阅读(2705) 回复(1)

如果你之前没有安装twisted模块,则先安装(包括安装zope.interface模块): http://www.zope.org/Products/ZopeInterface http://twistedmatrix.com/trac/ 下载最新版本的tar包,然后安装 安装方法很简单,都是: 1. 解压缩 2. python setup.py build 3. python setup.py install [root@lvdbing python]# cat twistedchatserver.py #!/usr/bin/env python # -*- coding:utf-8 -*- # vim: set ai cindent et sw=4 ts=4 nowra...

by lvDbing - Python文档中心 - 2008-09-21 03:30:49 阅读(1921) 回复(0)

本帖最后由 jd808 于 2011-12-14 17:04 编辑 /usr/lib/python2.6/site-packages/distribute-0.6.14-py2.6.egg /usr/lib/python2.6/site-packages/twisted-11.1.0_r33371-py2.6-linux-i686.egg 我是原码安装,但还是说找不到 Undefined variable from import: callLater Undefined variable from import: listenTCP Undefined variable from import: run Unused import: twisted server.py 终端测试正常,没有报错 # python ...

by jd808 - Python - 2011-12-15 19:17:55 阅读(4948) 回复(4)

我最近在学习twisted但是看着官方的文档有些问题,请教下大家,下面是2个简单的实例[code]from twisted.internet.protocol import Protocol class Echo(Protocol): def dataReceived(self, data): self.transport.write(data)[/code]这是一个简单的消息接受的类,重写了Protocol中的dataReceived,这里我有个疑问了,我查看了源代码中的Protocol类,并未发现有write这个属性,为何这里要这样写?这样的代码运行期也是...

by 一棵菠菜 - Python - 2014-05-19 15:48:58 阅读(4166) 回复(12)

本帖最后由 moartel 于 2012-07-05 09:10 编辑 想实现的功能, 客户端每10秒发送一次数据到服务器[code]from twisted.internet.protocol import Protocol,ClientFactory,Factory from twisted.internet import reactor,task host = '10.150.195.48' port = 56677 class Echo(Protocol): def connectionMade(self): self.transport.write("An apple a day keeps the doctor away") #self.transport.write(...

by moartel - Python - 2012-07-05 09:09:28 阅读(1798) 回复(0)

最近在学习twisted, 碰到几个问题请大家帮忙看看. 一个简单的客户端 #!/usr/bin/env python #coding: utf-8 from twisted.internet import reactor, protocol from twisted.protocols.basic import LineReceiver class sendmsgProtocol(LineReceiver): def connectionMade(self): print "sending %s" % str(self.factory.id) self.transport.write(str(self.factory.id)+'\r\n') def lineReceived(se...

by kwoarang - Python - 2010-06-25 09:44:14 阅读(1993) 回复(3)