Note: As it says in one of the posts, you have to:
set PYTHONUNBUFFERED=true
for the Python program to work as a websocket server, though it works fine without that if only run directly at the command line (without websocketd). Thanks to Joe for pointing this out.
1. Use WebSockets and Python for web-based system monitoring:
http://jugad2.blogspot.in/2014/01/use-websockets-and-python-...
2. websocketd and Python for system monitoring - the JavaScript WebSocket client:
http://jugad2.blogspot.in/2014/01/websocketd-and-python-for-...
Note: As it says in one of the posts, you have to:
set PYTHONUNBUFFERED=true
for the Python program to work as a websocket server, though it works fine without that if only run directly at the command line (without websocketd). Thanks to Joe for pointing this out.
websocketd is a nice utility.