#!/usr/bin/env python3 import json import os import random import signal import struct import sys import time try: import asyncio except ImportError: print("asyncio module not found (try pip install asyncio, or upgrade to Python 3.4 or later)") sys.exit(1) try: import websockets except ImportError: print("websockets module not found (try pip install websockets)") sys.exit(1) @asyncio.coroutine def mainloop(): ws = yield from websockets.connect('ws://localhost:8090/') entropy = struct.unpack("