parent
74e126e015
commit
704a87696f
|
@ -29,16 +29,6 @@ from threading import Thread
|
||||||
|
|
||||||
import hidapi as _hid
|
import hidapi as _hid
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
try:
|
|
||||||
read_packet = raw_input
|
|
||||||
except NameError:
|
|
||||||
# Python 3 equivalent of raw_input
|
|
||||||
read_packet = input
|
|
||||||
|
|
||||||
interactive = os.isatty(0)
|
interactive = os.isatty(0)
|
||||||
prompt = "?? Input: " if interactive else ""
|
prompt = "?? Input: " if interactive else ""
|
||||||
start_time = time.time()
|
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
|
sys.stdout.write("\033[300B") # move cusor at most 300 lines down, don't scroll
|
||||||
|
|
||||||
while t.is_alive():
|
while t.is_alive():
|
||||||
line = read_packet(prompt)
|
line = input(prompt)
|
||||||
line = line.strip().replace(" ", "")
|
line = line.strip().replace(" ", "")
|
||||||
# print ("line", line)
|
# print ("line", line)
|
||||||
if not line:
|
if not line:
|
||||||
|
|
Loading…
Reference in New Issue