import curses import Queue import argparse import sys import logging import traceback import json import threading FRAMERATE=1.0/60.0