klippy: Add Python2 module wrappers and use Python3 module naming

Add wrappers for some common Python modules so that the code can run
on both Python2 and Python3.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2021-10-01 19:30:48 -04:00
parent b8c91914b7
commit f1747b5118
6 changed files with 29 additions and 8 deletions

View file

@ -3,7 +3,7 @@
# Copyright (C) 2016-2019 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import logging, logging.handlers, threading, Queue as queue, time
import logging, logging.handlers, threading, queue, time
# Class to forward all messages through a queue to a background thread
class QueueHandler(logging.Handler):