From 67035fe24978a9a69b97d0cf150f4baf00e8492a Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Sat, 29 Aug 2020 12:48:01 +0100 Subject: [PATCH] use ord --- snippets/snippet1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/snippet1.py b/snippets/snippet1.py index eadd39b..55eea68 100644 --- a/snippets/snippet1.py +++ b/snippets/snippet1.py @@ -135,7 +135,7 @@ class MeterbusSerial(object): print("Waiting for input ... ") c = self.port.read() - print("State {}, Octet {:02X}".format(state, c[0])) + print("State {}, Octet {:02X}".format(state, ord(c)))