Reputation: 18830
I am searching for a websocket server implementation for Python3. There are some projects on the web, but they all run in HTTP-context. I need a server that is started on command line, not by an HTTP-server (No HTTP-Handler object available)
Ideally, the code should not require any bigger third party-project (like twisted, tornado ...)
Any ideas?
Concrete description of my use case: My network contains several python servers (not web servers). Every of these Python servers logs runtime information to a logger. Now, I want be able to listen to those logs from within a browser... and websocket seems the most interesting solution to me...
Upvotes: 2
Views: 2041
Reputation: 73091
My websockify project support python3. The websocket.py module that websockify is built on implements a generic python WebSocket server. It currently requires the numpy module if you want to use the new versions (HyBi-07+) of the protocol (I will probably implement a slower generic fallback in the next couple of days).
You also might be able to use 2to3 with pywebsocket to get it running in python 3. pywebsocket is really the reference implementation of WebSockets that both Chrome and Mozilla test against.
Upvotes: 2