Python论坛  - 讨论区

标题:Re[2]: 答复: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!

2004年08月01日 星期日 20:38

Zoom.Quiet zoomq at infopro.cn
Sun Aug 1 20:38:51 HKT 2004

Hollo limodou:

  Plone 2是在 CMF 1.3 的基础上进行亮度定制形成的信息管理平台,为了企业应用,特地定制了 Zope 的运行路径,所以,连 license 与 Zope 也是不同的!

简单的处理,你可以将Plone 在系统环境中写的路径都去掉,反正Polne 自个儿的启动脚本有全路径,

这样一来手工恢复所有Python 的运行环境就可以安全的运行newEdit 了是也乎!

/******** [2004-8-1]20:34:42 ; limodou wrote:

limodou> Liming_Do,您好!

limodou> 	我知道。我的意思是,plone也是使用了zope。当然,如果你安装时是一个完整的安装包的话,它自带一个zope。但如果是从源码安装的话,是装在原来的zope上的。不过现在plone还不能在zope3上运行。

limodou> ======= 2004-08-01 18:43:08 您在来信中写道:=======

>>limodou,您好,
>>刚下了一个zope3 beta2,确实是安在site-packages下面,
>>我遇到的问题是因为plone2的原因,和zope没有关系的
>>
>>-----原始邮件-----
>>发件人: python-chinese-bounces at lists.python.cn
>>[mailto:python-chinese-bounces at lists.python.cn]代表 limodou
>>发送时间: 2004年8月1日 16:51
>>收件人: python-chinese at lists.python.cn
>>主题: Re: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>
>>
>>Liming_Do,您好!
>>
>>	现在zope3就完全安装到了python目录下,不再有单独的目录。就解决了这个问题。
>>
>>======= 2004-08-01 15:52:43 您在来信中写道:=======
>>
>>>在环境变量里增加PYTHONPATH,并把C:\Python23\Lib\site-packages\
>>>设置在C:\Program Files\Plone
>>>2\Python\Lib\site-packages\前面,可以解决这个问题。
>>>安装zope后,zope不会修改已经安装的python的设置,但是会用自带的python版本,
>>>而且这些启动选项都是可以设置的,但是plone会对已经安装的python注册表等的值做修改
>>>
>>>-----原始邮件-----
>>>发件人: python-chinese-bounces at lists.python.cn
>>>[mailto:python-chinese-bounces at lists.python.cn]代表 Liming_Do
>>>发送时间: 2004年7月31日 14:46
>>>收件人: python-chinese at lists.python.cn
>>>主题: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>>
>>>
>>>我把plone卸载掉,NewEdit就可以运行了,
>>>wxPython就会使用python安装路径下site-packages下的版本,
>>>谁知道这是为什么?
>>>
>>>-----原始邮件-----
>>>发件人: python-chinese-bounces at lists.python.cn
>>>[mailto:python-chinese-bounces at lists.python.cn]代表 Liming_Do
>>>发送时间: 2004年7月30日 11:28
>>>收件人: python-chinese at lists.python.cn
>>>主题: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>>
>>>
>>>limodou,您好,
>>>我是安装的unicode版本,wxPythonWIN32-2.5.1.5u-Py23.exe
>>>我以前可以运行NewEdit2.3,但是安装plone2以后,
>>>plone2就把wxPython的映射到他自己的v 1.4.2.1 2003/04/02
>>>(C:\Program Files\Plone 2\Python\Lib\site-packages\wxPython)
>>>我的问题是不知道怎么能让python使用我自己的wxPython2.5 ?
>>>(C:\Python23\Lib\site-packages\wxPython)
>>>
>>>-----原始邮件-----
>>>发件人: python-chinese-bounces at lists.python.cn
>>>[mailto:python-chinese-bounces at lists.python.cn]代表 limodou
>>>发送时间: 2004年7月30日 11:19
>>>收件人: python-chinese at lists.python.cn
>>>主题: Re: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>>
>>>
>>>Liming_Do,您好!
>>>
>>>	是不是你没有安装unicode版?要unicode版本才可以。
>>>
>>>======= 2004-07-30 08:59:36 您在来信中写道:=======
>>>
>>>>limodou,您好,
>>>>
>>>>我运行NewEdit 2.4时,出现信息:
>>>>You must install wxPython 2.4 Unicode above and Python 2.3 version.
>>>>Please install them first before running NewEdit.
>>>>
>>>>Press Enter to exit the program ...
>>>>可是我安装了wxPython 2.5,
>>>>从help()中查看wxPython,发现:
>>>>NAME
>>>>    wxPython
>>>>
>>>>FILE
>>>>    c:\program files\plone
>>>> 2\python\lib\site-packages\wxpython\__init__.py
>>>>
>>>>DESCRIPTION
>>>>   
>>>> #----------------------------------------------------------------------------
>>>>    # Name:         __init__.py
>>>>    # Purpose:      The presence of this file turns this directory into a
>>>>    #               Python package.
>>>>    #
>>>>    # Author:       Robin Dunn
>>>>    #
>>>>    # Created:      8/8/98
>>>>    # RCS-ID:       $Id: __init__.py,v 1.4.2.1 2003/04/02 01:49:05 RD Exp $
>>>>    # Copyright:    (c) 1998 by Total Control Software
>>>>    # Licence:      wxWindows license
>>>>   
>>>> #----------------------------------------------------------------------------
>>>>可能是因为我先安装的wxPython的路径被后安装的plone
>>>>2替换掉了,我在注册表中没有找到这个选项,
>>>>请问,我该怎么把wxPython映射到我自己安装的wxPython(C:\Python23\Lib\site-packages\wxPython)?
>>>>
>>>>Liming
>>>>
>>>>-----原始邮件-----
>>>>发件人: python-chinese-bounces at lists.python.cn
>>>>[mailto:python-chinese-bounces at lists.python.cn]代表 0.706
>>>>发送时间: 2004年7月29日 9:18
>>>>收件人: python-chinese at lists.python.cn
>>>>主题: Re: [python-chinese]ANN:NewEdit 2.4版发布!
>>>>
>>>>
>>>>limodou,您好!
>>>>
>>>>	建议在帮助中加上python manuals的链接.
>>>>
>>>>======= 2004-07-28 17:15:17 您在来信中写道:=======
>>>>
>>>>>python-chinese,您好!
>>>>>
>>>>>下载地址:http://pyrecord.freezope.org/download/newedit_2.4r1.zip/down
>>>>>
>>>>>新增:
>>>>>
>>>>>1. 代码片段的导入和导出功能,可以导出或导入某个分类
>>>>>2. 增加打印功能,支持HTML文档的打印
>>>>>3. 增加psyco模块的加速支持,使用此功能要先安装psyco模块
>>>>>4. 增加用户插件的管理功能
>>>>>5. 在参数设置中可以设置新建文件缺省的语法高亮类型
>>>>>6. 增加停止运行Python程序的菜单和工具条按钮
>>>>>7. 运行Python程序时可以接收输入信息
>>>>>
>>>>>修改:
>>>>>
>>>>>1. DDE服务的端口可以在config.ini中指定
>>>>>2. 修改打印帮助文件为全路径,且使用file:///协议
>>>>>3. 修改在文件中查找时,双击结果文件行数跳转总多一行的问题
>>>>>4. 修改当存在混合回车符时,保存文件出错的问题
>>>>>
>>>>>有什么问题和建议,欢迎与我交流!
>>>>>	
>>>>>
>>>>>        致
>>>>>礼!
>>>>> 				
>>>>>
>>>>>        limodou
>>>>>        chatme at 263.net
>>>>>          2004-07-28
>>>>>_______________________________________________
>>>>>python-chinese list
>>>>>python-chinese at lists.python.cn
>>>>>http://python.cn/mailman/listinfo/python-chinese
>>>>>
>>>>
>>>>= = = = = = = = = = = = = = = = = = = =
>>>>			
>>>>
>>>>        致
>>>>礼!
>>>> 
>>>>				 
>>>>        0.706
>>>>        0.706 at 163.com
>>>>          2004-07-29
>>>>
>>>>_______________________________________________
>>>>python-chinese list
>>>>python-chinese at lists.python.cn
>>>>http://python.cn/mailman/listinfo/python-chinese
>>>
>>>= = = = = = = = = = = = = = = = = = = =
>>>			
>>>
>>>        致
>>>礼!
>>> 
>>>				 
>>>        limodou
>>>        chatme at 263.net
>>>          2004-07-30
>>>
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>
>>= = = = = = = = = = = = = = = = = = = =
>>			
>>
>>        致
>>礼!
>> 
>>				 
>>        limodou
>>        chatme at 263.net
>>          2004-08-01
>>
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese

limodou> = = = = = = = = = = = = = = = = = = = =
			

limodou>         致
limodou> 礼!
 
				 
limodou>         limodou
limodou>         chatme at 263.net
limodou>           2004-08-01



********************************************/

-- 
Free as in Freedom

 Zoom.Quiet                           

#=========================================#
]Time is unimportant, only life important![
#=========================================#

sender is the Bat!2.12.00



[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年08月01日 星期日 20:49

Liming_Do Liming_Do at smics.com
Sun Aug 1 20:49:42 HKT 2004

Hello,Zoom,

“简单的处理,你可以将Plone 在系统环境中写的路径都去掉,反正Polne 自个儿的启动脚本有全路径,”

这里所说的在系统环境中写的路径都去掉,是指注册表中的路径吗?
注册表中会写三个ITEM
Pythonwin	C:\Program Files\Plone 2\Python\lib\site-packages\Pythonwin
win32	C:\Program Files\Plone 2\Python\lib\site-packages\win32;C:\Program Files\Plone 2\Python\lib\site-packages\win32\lib
win32com	C:\Python23\Lib\site-packages;C:\Program Files\Plone 2\Python\lib\site-packages

我把C:\Python23\Lib\site-packages;加到了C:\Program Files\Plone 2\Python\lib\site-packages的前面,NewEdit就可以运行了。

但是我还有一点不明白,sys.path中的加载顺序是从哪里读出来的呢?

['C:\\Python23\\Lib\\idlelib', 'C:\\Program Files\\Plone 2\\Zope\\lib\\python', 'C:\\WINNT\\system32\\python23.zip', 'C:\\Program Files\\Plone 2\\Python\\lib\\site-packages\\Pythonwin', 'C:\\Program Files\\Plone 2\\Python\\lib\\site-packages\\win32', 'C:\\Program Files\\Plone 2\\Python\\lib\\site-packages\\win32\\lib', 'C:\\Python23\\Lib\\site-packages', 'C:\\Program Files\\Plone 2\\Python\\lib\\site-packages', 'C:\\Python23\\DLLs', 'C:\\Python23\\lib', 'C:\\Python23\\lib\\plat-win', 'C:\\Python23\\lib\\lib-tk', 'C:\\Python23']

默认是没有PYTHONPATH的,如果我在环境变量中创建PYTHONPATH,sys.path会有所改变。

-----原始邮件-----
发件人: python-chinese-bounces at lists.python.cn
[mailto:python-chinese-bounces at lists.python.cn]代表 Zoom.Quiet
发送时间: 2004年8月1日 20:39
收件人: limodou
主题: Re[2]: 答复: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!


Hollo limodou:

  Plone 2是在 CMF 1.3 的基础上进行亮度定制形成的信息管理平台,为了企业应用,特地定制了 Zope 的运行路径,所以,连 license 与 Zope 也是不同的!

简单的处理,你可以将Plone 在系统环境中写的路径都去掉,反正Polne 自个儿的启动脚本有全路径,

这样一来手工恢复所有Python 的运行环境就可以安全的运行newEdit 了是也乎!

/******** [2004-8-1]20:34:42 ; limodou wrote:

limodou> Liming_Do,您好!

limodou> 	我知道。我的意思是,plone也是使用了zope。当然,如果你安装时是一个完整的安装包的话,它自带一个zope。但如果是从源码安装的话,是装在原来的zope上的。不过现在plone还不能在zope3上运行。

limodou> ======= 2004-08-01 18:43:08 您在来信中写道:=======

>>limodou,您好,
>>刚下了一个zope3 beta2,确实是安在site-packages下面,
>>我遇到的问题是因为plone2的原因,和zope没有关系的
>>
>>-----原始邮件-----
>>发件人: python-chinese-bounces at lists.python.cn
>>[mailto:python-chinese-bounces at lists.python.cn]代表 limodou
>>发送时间: 2004年8月1日 16:51
>>收件人: python-chinese at lists.python.cn
>>主题: Re: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>
>>
>>Liming_Do,您好!
>>
>>	现在zope3就完全安装到了python目录下,不再有单独的目录。就解决了这个问题。
>>
>>======= 2004-08-01 15:52:43 您在来信中写道:=======
>>
>>>在环境变量里增加PYTHONPATH,并把C:\Python23\Lib\site-packages\
>>>设置在C:\Program Files\Plone
>>>2\Python\Lib\site-packages\前面,可以解决这个问题。
>>>安装zope后,zope不会修改已经安装的python的设置,但是会用自带的python版本,
>>>而且这些启动选项都是可以设置的,但是plone会对已经安装的python注册表等的值做修改
>>>
>>>-----原始邮件-----
>>>发件人: python-chinese-bounces at lists.python.cn
>>>[mailto:python-chinese-bounces at lists.python.cn]代表 Liming_Do
>>>发送时间: 2004年7月31日 14:46
>>>收件人: python-chinese at lists.python.cn
>>>主题: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>>
>>>
>>>我把plone卸载掉,NewEdit就可以运行了,
>>>wxPython就会使用python安装路径下site-packages下的版本,
>>>谁知道这是为什么?
>>>
>>>-----原始邮件-----
>>>发件人: python-chinese-bounces at lists.python.cn
>>>[mailto:python-chinese-bounces at lists.python.cn]代表 Liming_Do
>>>发送时间: 2004年7月30日 11:28
>>>收件人: python-chinese at lists.python.cn
>>>主题: 答复: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>>
>>>
>>>limodou,您好,
>>>我是安装的unicode版本,wxPythonWIN32-2.5.1.5u-Py23.exe
>>>我以前可以运行NewEdit2.3,但是安装plone2以后,
>>>plone2就把wxPython的映射到他自己的v 1.4.2.1 2003/04/02
>>>(C:\Program Files\Plone 2\Python\Lib\site-packages\wxPython)
>>>我的问题是不知道怎么能让python使用我自己的wxPython2.5 ?
>>>(C:\Python23\Lib\site-packages\wxPython)
>>>
>>>-----原始邮件-----
>>>发件人: python-chinese-bounces at lists.python.cn
>>>[mailto:python-chinese-bounces at lists.python.cn]代表 limodou
>>>发送时间: 2004年7月30日 11:19
>>>收件人: python-chinese at lists.python.cn
>>>主题: Re: 答复: [python-chinese]ANN:NewEdit 2.4版发布!
>>>
>>>
>>>Liming_Do,您好!
>>>
>>>	是不是你没有安装unicode版?要unicode版本才可以。
>>>
>>>======= 2004-07-30 08:59:36 您在来信中写道:=======
>>>
>>>>limodou,您好,
>>>>
>>>>我运行NewEdit 2.4时,出现信息:
>>>>You must install wxPython 2.4 Unicode above and Python 2.3 version.
>>>>Please install them first before running NewEdit.
>>>>
>>>>Press Enter to exit the program ...
>>>>可是我安装了wxPython 2.5,
>>>>从help()中查看wxPython,发现:
>>>>NAME
>>>>    wxPython
>>>>
>>>>FILE
>>>>    c:\program files\plone
>>>> 2\python\lib\site-packages\wxpython\__init__.py
>>>>
>>>>DESCRIPTION
>>>>   
>>>> #----------------------------------------------------------------------------
>>>>    # Name:         __init__.py
>>>>    # Purpose:      The presence of this file turns this directory into a
>>>>    #               Python package.
>>>>    #
>>>>    # Author:       Robin Dunn
>>>>    #
>>>>    # Created:      8/8/98
>>>>    # RCS-ID:       $Id: __init__.py,v 1.4.2.1 2003/04/02 01:49:05 RD Exp $
>>>>    # Copyright:    (c) 1998 by Total Control Software
>>>>    # Licence:      wxWindows license
>>>>   
>>>> #----------------------------------------------------------------------------
>>>>可能是因为我先安装的wxPython的路径被后安装的plone
>>>>2替换掉了,我在注册表中没有找到这个选项,
>>>>请问,我该怎么把wxPython映射到我自己安装的wxPython(C:\Python23\Lib\site-packages\wxPython)?
>>>>
>>>>Liming
>>>>
>>>>-----原始邮件-----
>>>>发件人: python-chinese-bounces at lists.python.cn
>>>>[mailto:python-chinese-bounces at lists.python.cn]代表 0.706
>>>>发送时间: 2004年7月29日 9:18
>>>>收件人: python-chinese at lists.python.cn
>>>>主题: Re: [python-chinese]ANN:NewEdit 2.4版发布!
>>>>
>>>>
>>>>limodou,您好!
>>>>
>>>>	建议在帮助中加上python manuals的链接.
>>>>
>>>>======= 2004-07-28 17:15:17 您在来信中写道:=======
>>>>
>>>>>python-chinese,您好!
>>>>>
>>>>>下载地址:http://pyrecord.freezope.org/download/newedit_2.4r1.zip/down
>>>>>
>>>>>新增:
>>>>>
>>>>>1. 代码片段的导入和导出功能,可以导出或导入某个分类
>>>>>2. 增加打印功能,支持HTML文档的打印
>>>>>3. 增加psyco模块的加速支持,使用此功能要先安装psyco模块
>>>>>4. 增加用户插件的管理功能
>>>>>5. 在参数设置中可以设置新建文件缺省的语法高亮类型
>>>>>6. 增加停止运行Python程序的菜单和工具条按钮
>>>>>7. 运行Python程序时可以接收输入信息
>>>>>
>>>>>修改:
>>>>>
>>>>>1. DDE服务的端口可以在config.ini中指定
>>>>>2. 修改打印帮助文件为全路径,且使用file:///协议
>>>>>3. 修改在文件中查找时,双击结果文件行数跳转总多一行的问题
>>>>>4. 修改当存在混合回车符时,保存文件出错的问题
>>>>>
>>>>>有什么问题和建议,欢迎与我交流!
>>>>>	
>>>>>
>>>>>        致
>>>>>礼!
>>>>> 				
>>>>>
>>>>>        limodou
>>>>>        chatme at 263.net
>>>>>          2004-07-28
>>>>>_______________________________________________
>>>>>python-chinese list
>>>>>python-chinese at lists.python.cn
>>>>>http://python.cn/mailman/listinfo/python-chinese
>>>>>
>>>>
>>>>= = = = = = = = = = = = = = = = = = = =
>>>>			
>>>>
>>>>        致
>>>>礼!
>>>> 
>>>>				 
>>>>        0.706
>>>>        0.706 at 163.com
>>>>          2004-07-29
>>>>
>>>>_______________________________________________
>>>>python-chinese list
>>>>python-chinese at lists.python.cn
>>>>http://python.cn/mailman/listinfo/python-chinese
>>>
>>>= = = = = = = = = = = = = = = = = = = =
>>>			
>>>
>>>        致
>>>礼!
>>> 
>>>				 
>>>        limodou
>>>        chatme at 263.net
>>>          2004-07-30
>>>
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>
>>= = = = = = = = = = = = = = = = = = = =
>>			
>>
>>        致
>>礼!
>> 
>>				 
>>        limodou
>>        chatme at 263.net
>>          2004-08-01
>>
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese

limodou> = = = = = = = = = = = = = = = = = = = =
			

limodou>         致
limodou> 礼!
 
				 
limodou>         limodou
limodou>         chatme at 263.net
limodou>           2004-08-01



********************************************/

-- 
Free as in Freedom

 Zoom.Quiet                           

#=========================================#
]Time is unimportant, only life important![
#=========================================#

sender is the Bat!2.12.00

_______________________________________________
python-chinese list
python-chinese at lists.python.cn
http://python.cn/mailman/listinfo/python-chinese


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年08月02日 星期一 08:44

info@xichen.com info at xichen.com
Mon Aug 2 08:44:25 HKT 2004

HD,您好!

	不能和cmpp一样吗?先发resp消息,再发内容报告,也就是状态报告了。
    因为
    如果服务器查询文件简介需要花费很长时间,那么请求端就需要很大量的维持这个消息包和缓冲没有收到resp的请求加重了客户机负担。当一定时间没有返回,客户端只能再次发送查询包,服务器将出现恶性循环,直到瘫痪。
    我一直没弄明白uss现阶段的目标是什么,可能和我没仔细看信件和资料有关系。
    如果现在只查询地址信息,就是类似dns查询。那么和现在的代码目标不相符合啊,而且可以借鉴dns服务的包处理机制。
    对于查询地址来讲udp包更适合。因为它不关心连接的状态。

======= 2004-08-01 21:38:35 您在来信中写道:=======

>想起了你的代码了,给你一个非常特殊但是也会非常容易出现的情况,a这个报文是查询一个用户存储中的所有文件的简介,这个数据库查询的时间会较长,这种情况下,如何处理?
>
>On Sun, 01 Aug 2004 19:19:25 +0800, "info" <info at xichen.com>
><info at xichen.com> wrote:
>> 周一上班了才能仔细看列表里面的邮件.再学习一下各位的先进经验.
>> 
>> 关于短连接如果是用udp协议的话,我有几点建议.
>> 1、对于短连接来讲,滑动窗口存在的意义不大。因为是无连接的连接协议,保存发送的
>> 数据包的状态并做正确处理(比如缓冲等)更需要良好的处理。
>> 2、针对与不同的路由方式(有建立连接后端口不变和端口变化)需要不同的处理方式。
>> (也就是最头疼的udp穿越路由的问题)
>> 3、解决后包先到,数据包重新组合的问题。
>> 
>> 还有,我觉得我写的版本好象比你们快些哦,窗口定为40后,单机运行在32秒左右发完
>> 所有包。配置p4 2.4 +512RAM+2k
>> 
>> HD的信件内容:
>> 
>> > 呵呵.在我本机做的测试.数据量为0xfffff
>> > 测试数据.   1048575 条
>> > 收到 1048575 条
>> > 最后收到uid为.1048574
>> > 用时.500.64 秒
>> > 每秒.2094.466528条
>> > 已经基本达到的预期.下面就看短连接的情况了. :)
>> >
>> > On Sat, 31 Jul 2004 13:33:54 +0800, Zoom.Quiet <zoomq at infopro.cn> wrote:
>> >> Hollo HD:
>> >>
>> >>   神.
>> >> Server at Win2k3; PIV2.8GHz;2Gb;
>> >> Client from Win2k3; C2.5Gb;512Mb;
>> >> [g:\zdevelop\zpython\@python-chinese\@uss\040731-hoxide\benchmarks]python ussc.py
>> >> Connect successfully
>> >> Connection lost
>> >> 测试数据.     65535 条
>> >> 收到 65535 条
>> >> 最后收到uid为.65534
>> >> 用时.48.37 秒
>> >> 每秒.1354.951168条
>> >>
>> >> +++++++++++++++
>> >> Server at Win2k3; C2.5Gb;512Mb;
>> >> Client from Win2k3; PIV2.8GHz;2Gb;
>> >> F:\ZqTEMP\040731-hoxide\benchmarks>python ussc.py
>> >> Connect successfully
>> >> Connection lost
>> >> 测试数据.     65535 条
>> >> 收到 65535 条
>> >> 最后收到uid为.65534
>> >> 用时.38.96 秒
>> >> 每秒.1681.915314条
>> >>
>> >> 看来将压力放到了客户端.....
>> >>
>> >> /******** [2004-07-31]13:31:16 ; HD wrote:
>> >>
>> >> HD> 这是我和hoxide优化后的banchmarks.数据量达到0xffff时还能保持到每秒2300的. :)
>> >> HD> 大家试试罢.今天晚上将细说banchmarks的优化过程.
>> >>
>> >> HD> On Sat, 31 Jul 2004 10:29:32 +0800, HD <hdcola at gmail.com> wrote:
>> >> >> 今天晚上.7月31日..月黑风高之时.20时点整..有一大驼人.pythoner.pyuss参与者.twisteder们..将在uc.http://www.51uc.com可以下到.中的窝点.团体号4070424.开音乐会.twisted精讲会.open
>> >> >> gns讨论会.
>> >> >> 欢迎大家前来参与.有任何问题请与火.就是HD乐..天成.qq号2251744.联系.或请至电qq群1073669向在线的gg.jj.dd.mm们询问.
>> >> >>
>> >> >> --
>> >> >> HD.燃烧中的火.
>> >> >> 我工作我快乐.我勤奋我收获.请与我一起快乐.与我一起收获.
>> >>
>> >>
>> >> >>
>> >>
>> >> ********************************************/
>> >>
>> >> --
>> >> Free as in Freedom
>> >>
>> >>  Zoom.Quiet
>> >>
>> >> #=========================================#
>> >> ]Time is unimportant, only life important![
>> >> #=========================================#
>> >>
>> >> sender is the Bat!2.12.00
>> >>
>> >> _______________________________________________
>> >> python-chinese list
>> >> python-chinese at lists.python.cn
>> >> http://python.cn/mailman/listinfo/python-chinese
>> >>
>> >
>> >
>> > --
>> > HD.燃烧中的火.
>> > 我工作我快乐.我勤奋我收获.请与我一起快乐.与我一起收获.
>> > _______________________________________________
>> > python-chinese list
>> > python-chinese at lists.python.cn
>> > http://python.cn/mailman/listinfo/python-chinese
>> 
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
>> 
>
>
>-- 
>HD(燃烧中的火)
>我工作我快乐,我勤奋我收获。请与我一起快乐,与我一起收获。
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        info
        info at xichen.com
          2004-08-02


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年08月02日 星期一 08:46

info at xichen.com info at xichen.com
Mon Aug 2 08:46:21 HKT 2004

info" http://219.140.78.7/py-tut2.r
http://219.140.78.7/py-tut2.mp3

======= 2004-08-01 19:11:51 您在来信中写道:=======

>我周一上班后帮你们传上去. 
>
>Liming_Do的信件内容: 
>
>> info,您好,
>> 能不能再麻烦传到上次的地址,http://219.140.78.7/py-tut1.r
>> 这个地址超快,而且应该有一些人象我一样不能访问FTP
>> 或者Yanbo有没有Http的空间? 
>> 
>> -----原始邮件-----
>> 发件人: python-chinese-bounces at lists.python.cn
>> [mailto:python-chinese-bounces at lists.python.cn]代表 Xie Yanbo
>> 发送时间: 2004年8月1日 17:32
>> 收件人: python-chinese at lists.python.cn
>> 主题: [python-chinese] 第二次网上教程之录音文件 
>> 
>> 
>> 从开始到最后,包括HD不在的半个多小时一点不漏,原始素材,180M 
>> 
>>   ftp://202.108.142.211/pub/twisted/20040801.mp3 
>> 
>> 不能下载mp3格式文件的下载: 
>> 
>>   ftp://202.108.142.211/pub/twisted/20040801.copy 
>> 
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
> 
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        info
        info at xichen.com
          2004-08-02


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年08月02日 星期一 08:52

info at xichen.com info at xichen.com
Mon Aug 2 08:52:45 HKT 2004

limodou,您好!

	用twisted写的服务器端本身就处理的多线程,这个大家可以用我们做测试的例子来试。
    对于客户端来讲,除非是传输文件本身,没有必要采用多线程。
    我的意见是,达到本期的产品基线,然后用最稳定、最简洁的方式来实现。

======= 2004-08-01 16:50:58 您在来信中写道:=======

>hoxide,您好!
>
>	的确,整个程序只有一个线程,那么这种异步都通过twisted来完成,的确象queue这种阻塞方式就无法实现了。多线程,多点测试才更符合实际。
>
>
>======= 2004-08-01 15:28:13 您在来信中写道:=======
>
>>limodou,您好!
>>
>>	开始我们也尝试过用queue的阻塞处理,但这样就阻塞了主线程,连recive都不行.
>>这个问题的根本解决方案还是用线程,我只是提供一种类似的东西("轻便线程"http://www-900.ibm.com/developerWorks/cn/linux/sdk/python/)
>>另外我觉得应该建一个多连接的测试程序,而不只是一个连接多请求的测试程序.
>>而窗口应该放在服务端比较好一点
>>
>>======= 2004-08-01 14:54:55 您在来信中写道:=======
>>
>>>hoxide,您好!
>>>
>>>	其实真正的数据发送是由客户端做的,我们可以把连接、发送数据等进行封装由客户端来调用。这样由客户端去组织数据,而我们的协议处理只是一个被调用方就行了。因为这只是一个测试程序,还不是真正的应用,因此可能就不讲究了。真正做成客户端,可能程序都要改了。既然我们不想发送太快,queue完全可以采用阻塞方式来处理。                                                                      
>>>                                                                            
>>>======= 2004-08-01 14:31:17 您在来信中写道:=======
>>>
>>>>limodou,您好!
>>>>
>>>>	这点我直到但是程序还是依赖一个全局变量,对于复杂的情况,这种用法是不好的,首先明显得会带来名字空间的污染,其次如果程序执行的上下文关系复杂,那么也就不是几个全局变量能轻松解决的.
>>>>
>>>>
>>>>======= 2004-08-01 14:07:21 您在来信中写道:=======
>>>>
>>>>>hoxide,您好!
>>>>>
>>>>>	其实不丢message也可以,这样不用使用生成器。只要把message生成放到else中就行了。因为那时是可以发送数据的。之所以丢是因为先生成了message,然后才判断是否可以发送,如果不能发送自然就丢了。如果改到可以发送才生成message就不会丢了。
>>>>>
>>>>>        while nownum < count:
>>>>>            if self.factory.sendQueue.full():       
>>>>>                self.call = reactor.callLater(0, self.testserver)
>>>>>                return 
>>>>>            else:
>>>>>                message = usspmsg.USSPMessage()                   #*
>>>>>                message.setMsgName('mail_counter')                #*
>>>>>                message.body.setField('uid',str(nownum))          #* 这几行移下来了
>>>>>                self.factory.sendQueue.put_nowait(message)
>>>>>                nownum += 1
>>>>>
>>>>>======= 2004-08-01 12:19:47 您在来信中写道:=======
>>>>>
>>>>>>HD,您好!
>>>>>>
>>>>>>大家最好先了解一下生成器的有关知识:IBM上的《可爱的 Python:迭代器和简单生成器》: http://www-900.ibm.com/developerWorks/cn/linux/sdk/python/charm-20/index.shtml
>>>>>>
>>>>>>昨天给的代码还有点错误,修改的代码(其实只改了打星号的地方):
>>>>>>
>>>>>>    def testserver(self):
>>>>>>        """向服务器发的测试报文"""
>>>>>>        try:
>>>>>>            self.pp.next()
>>>>>>            self.call = reactor.callLater(0,self.testserver)
>>>>>>            return
>>>>>>        except StopIteration:
>>>>>>            pass
>>>>>>   
>>>>>>    def __init__(self):
>>>>>>        self.pp=self.sendQQ()
>>>>>>        ussp.USSClientQueueProtocol.__init__(self)
>>>>>>        
>>>>>>    def sendQQ(self):
>>>>>>        global nownum
>>>>>>        global count
>>>>>>        i=1
>>>>>>        while i < count:
>>>>>>            message = usspmsg.USSPMessage()
>>>>>>            message.setMsgName('mail_counter')
>>>>>>            message.body.setField('uid',str(i))  
>>>>>>            while self.factory.sendQueue.full():        #*  
>>>>>>                yield None                              #**
>>>>>>            self.factory.sendQueue.put_nowait(message)
>>>>>>            i += 1
>>>>>>        nownum=i
>>>>>>        self.disconnect()
>>>>>>
>>>>>>这里真正的处理是在sendQQ这个函数定义的.self.pp是生成器的实例,由__init__()生成,testserver只是调度完成这个处理的函数,而且是和具体的处理独立的,他只是简单得实现了当处理"暂停"后的重新启动.
>>>>>>
>>>>>>真正神奇的地方是打星号的行.他测试sendQueue确定是否能发出message,如果不能就会执行yield None,这时函数就终止在**这行,直到在有.next()方法调用时再从这句开始执行.
>>>>>>这个好处是原来的处理流程可以很顺利得进行.不需要保存中间变量.注意0731a的testserver能正确得发出所有message,是因为恰巧有全局变量nownum完全确定处理的执行状态了.但事事上一般的处理不会那么简单,有复杂的状态组合(上面的代码并没用nownum,而是用了循环变量i,注意他不是全局的!!!!!).正像zoomq昨天说的0731a的testserver在queue满的时候前面对message的处理就被抛弃了,但在这个生成器版本,先前对message的处理没有被抛弃.
>>>>>>
>>>>>>个人觉得这个生成器版本还是不够完美,异步传输还是应该以线程为基础进行.下一个版本可能是基于生成器的简单线程:)
>>>>>>
>>>>>>说得不是很明白,我不清楚大家对什么地方有疑问.
>>>>>>
>>>>>>
>>>>>>===== 2004-08-01 00:33:08 您在来信中写道:=======
>>>>>>
>>>>>>>细说说,为什么说是生成器版的呢?
>>>>>>>
>>>>>>>On Sat, 31 Jul 2004 23:22:53 +0800, hoxide <hoxide_dirac at yahoo.com.cn> wrote:
>>>>>>>> python-chinese,您好!
>>>>>>>> 
>>>>>>>>           为什么要用生成器,现在的testserver的执行流程只依赖于nownum,而事实上通常的服务要依赖于整个运行流程.另外这样的写法可将窗口部分的代码抽出.
>>>>>>>> 
>>>>>>>>>>>>>>>> 礼!
>>>>>>>> 
>>>>>>>> hoxide
>>>>>>>> hoxide_dirac at yahoo.com.cn
>>>>>>>> 2004-07-31
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>>-- 
>>>>>>>HD(燃烧中的火)
>>>>>>>我工作我快乐,我勤奋我收获。请与我一起快乐,与我一起收获。
>>>>>>>_______________________________________________
>>>>>>>python-chinese list
>>>>>>>python-chinese at lists.python.cn
>>>>>>>http://python.cn/mailman/listinfo/python-chinese
>>>>>>>
>>>>>>
>>>>>>= = = = = = = = = = = = = = = = = = = =
>>>>>>			
>>>>>>
>>>>>>        致
>>>>>>礼!
>>>>>> 
>>>>>>				 
>>>>>>        hoxide
>>>>>>        hoxide_dirac at yahoo.com.cn
>>>>>>          2004-08-01
>>>>>>
>>>>>>_______________________________________________
>>>>>>python-chinese list
>>>>>>python-chinese at lists.python.cn
>>>>>>http://python.cn/mailman/listinfo/python-chinese
>>>>>>
>>>>>
>>>>>= = = = = = = = = = = = = = = = = = = =
>>>>>			
>>>>>
>>>>>        致
>>>>>礼!
>>>>> 
>>>>>				 
>>>>>        limodou
>>>>>        chatme at 263.net
>>>>>          2004-08-01
>>>>>
>>>>>_______________________________________________
>>>>>python-chinese list
>>>>>python-chinese at lists.python.cn
>>>>>http://python.cn/mailman/listinfo/python-chinese
>>>>>
>>>>
>>>>= = = = = = = = = = = = = = = = = = = =
>>>>			
>>>>
>>>>        致
>>>>礼!
>>>> 
>>>>				 
>>>>        hoxide
>>>>        hoxide_dirac at yahoo.com.cn
>>>>          2004-08-01
>>>>
>>>>_______________________________________________
>>>>python-chinese list
>>>>python-chinese at lists.python.cn
>>>>http://python.cn/mailman/listinfo/python-chinese
>>>>
>>>
>>>= = = = = = = = = = = = = = = = = = = =
>>>			
>>>
>>>        致
>>>礼!
>>> 
>>>				 
>>>        limodou
>>>        chatme at 263.net
>>>          2004-08-01
>>>
>>>_______________________________________________
>>>python-chinese list
>>>python-chinese at lists.python.cn
>>>http://python.cn/mailman/listinfo/python-chinese
>>>
>>
>>= = = = = = = = = = = = = = = = = = = =
>>			
>>
>>        致
>>礼!
>> 
>>				 
>>        hoxide
>>        hoxide_dirac at yahoo.com.cn
>>          2004-08-01
>>
>>_______________________________________________
>>python-chinese list
>>python-chinese at lists.python.cn
>>http://python.cn/mailman/listinfo/python-chinese
>>
>
>= = = = = = = = = = = = = = = = = = = =
>			
>
>        致
>礼!
> 
>				 
>        limodou
>        chatme at 263.net
>          2004-08-01
>
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        info
        info at xichen.com
          2004-08-02


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号