From 704a87696febf8175e86c890ec66afd520d16d51 Mon Sep 17 00:00:00 2001 From: MattHag <16444067+MattHag@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:19:50 +0200 Subject: [PATCH] hidapi: Remove Python 2 compatibility (#2460) Related #2273 --- lib/hidapi/hidconsole.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/hidapi/hidconsole.py b/lib/hidapi/hidconsole.py index cd963edf..c706e5af 100644 --- a/lib/hidapi/hidconsole.py +++ b/lib/hidapi/hidconsole.py @@ -29,16 +29,6 @@ from threading import Thread import hidapi as _hid -# -# -# - -try: - read_packet = raw_input -except NameError: - # Python 3 equivalent of raw_input - read_packet = input - interactive = os.isatty(0) prompt = "?? Input: " if interactive else "" start_time = time.time() @@ -217,7 +207,7 @@ def main(): sys.stdout.write("\033[300B") # move cusor at most 300 lines down, don't scroll while t.is_alive(): - line = read_packet(prompt) + line = input(prompt) line = line.strip().replace(" ", "") # print ("line", line) if not line: