From 14129f667ce4eb29330775c66ec92bc35536661a Mon Sep 17 00:00:00 2001 From: Ted Morin Date: Tue, 7 Feb 2017 17:59:58 -0500 Subject: [PATCH] Fix python 3 support --- plover_palantype_machine.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plover_palantype_machine.py b/plover_palantype_machine.py index 41587ba..72bc640 100755 --- a/plover_palantype_machine.py +++ b/plover_palantype_machine.py @@ -39,11 +39,12 @@ def run(self): while not self.finished.isSet(): if not self.serial_port.inWaiting(): self.serial_port.write(REQUEST_READ) - sleep(0.1) # Request a read 5 times a second + # Request a read 10 times a second + sleep(0.1) raw = self.serial_port.read(self.serial_port.inWaiting()) # Every stroke is 5 bytes and we drop the first one. - for i in range(len(raw)/5): + for i in range(len(raw)//5): keys = self._parse_packet(raw[i*5+1:(i+1)*5]) steno_keys = self.keymap.keys_to_actions(keys) if steno_keys: diff --git a/setup.py b/setup.py index a263950..9e9005b 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='plover_palantype_system', - version='0.1.0', + version='0.2.0', description='Palantype system for Plover', author='Ted Morin', author_email='morinted@gmail.com',