I spend a few days trying to implement a simple server to exchange messages with a browser but it doesn't work(the browser is supposed to be the GUI for my python program).
I looked around and couldn't find any already built module I can use. Either are the modules for Python 2 or else they are too complex. I want a single .py file which I can use to read and send websocket messages with/to the browser.
Does something like that exist?
It turns out there's a 3.3+
websockets using asyncio
found here
It might not meet your simplicity measure, but the websocket.py file inside websockify supports python 2.x and 3.x in the same code-base.
The echo example that uses it is pretty simple.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With