简体   繁体   English

将Autobahn安装到python 3.4上

[英]Installing Autobahn twisted onto python 3.4

I am running a simple server that connects to a https webpage through websockets. 我正在运行一个简单的服务器,该服务器通过websockets连接到https网页。

To keep the server running, I was going to use asyncio. 为了保持服务器运行,我打算使用asyncio。 To validate the SSL, I was going to use Twisted's rather simple functions. 为了验证SSL,我将使用Twisted的相当简单的功能。

My problem is I am having the worst time getting Twisted to run on Python 3.4. 我的问题是让Twisted在Python 3.4上运行的时间最糟糕。 Its static.py file keeps 其static.py文件保留

    from twisted.web.static import File

File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/twisted/web/static.py", line 440
    def _doSingleRangeRequest(self, request, (start, end)):

which tells me that it must be using Twisteds 2.7 code. 告诉我它必须使用Twisteds 2.7代码。

How do I go about repairing this or is this a lost cause? 我该如何解决这个问题或这是一个丢失的原因?

twisted.web.static hasn't been ported to Python 3 yet, according to this open bug . 根据此打开的bugtwisted.web.static尚未移植到Python 3。 You can see which modules are compatible here . 您可以在此处查看兼容的模块。 Unless you're feeling really ambitious and want to try porting it yourself, you're probably out of luck. 除非您真的有野心,并且想尝试自己移植它,否则可能很不幸。

please check this 请检查一下

http://twistedmatrix.com/trac/ticket/6177 http://twistedmatrix.com/trac/ticket/6177

twisted.web.static ought to work now. twisted.web.static应该现在可以工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM