Total Pageviews

Monday, 22 July 2013

windows下,不能监听端口问题的解决

如果你在 windows下的 cmd.exe里运行python p.py client server_ip,但是显示如图:
http://i.imgur.com/rBvoVbE.jpg所示的内容,该如何解决此错误呢?请看:
http://briteming.blogspot.co.uk/2013/07/windows_19.html 
----------------------------------

服务器端:
apt-get install python
apt-get install python-twisted
 (如果是centos/fedora系统,则
yum install python
yum install python-twisted)
Or
pip install twisted
 
windows 客户机上,先安装好python2.7 环境,(在你的本地windows机器上安装python2.7.3环境 ,http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi, python2.7.2有问题,建议卸载python2.7.2,安装python2.7.3),
然后安装twisted:
http://twistedmatrix.com/Releases/Twisted/13.1/Twisted-13.1.0.win32-py2.7.exe
还要装zope interface: 
http://twistedmatrix.com/trac/wiki/Downloads
https://pypi.python.org/packages/2.7/z/zope.interface/zope.interface-4.0.5.win32-py2.7.exe