From bd92c5fb0a72d6d08bcf0f6973f39637f68af1db Mon Sep 17 00:00:00 2001 From: Richard Hayler Date: Sat, 3 Aug 2019 20:43:47 +0100 Subject: [PATCH 1/3] Update all-in-one-no-pm.py added decoding of bytestring to provide Python3 compatibility. --- examples/all-in-one-no-pm.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/all-in-one-no-pm.py b/examples/all-in-one-no-pm.py index 367ebeb..bc19e12 100644 --- a/examples/all-in-one-no-pm.py +++ b/examples/all-in-one-no-pm.py @@ -80,6 +80,7 @@ def display_text(variable, data, unit): def get_cpu_temperature(): process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE) output, _error = process.communicate() + output = output.decode() return float(output[output.index('=') + 1:output.rindex("'")]) From 847937ac3d550e805764a741344a5994aa3148da Mon Sep 17 00:00:00 2001 From: Richard Hayler Date: Sat, 3 Aug 2019 20:47:08 +0100 Subject: [PATCH 2/3] Update all-in-one.py added decoding of bytestring to provide Python3 compatibility. --- examples/all-in-one.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/all-in-one.py b/examples/all-in-one.py index 8ba7681..695a007 100755 --- a/examples/all-in-one.py +++ b/examples/all-in-one.py @@ -86,6 +86,7 @@ def display_text(variable, data, unit): def get_cpu_temperature(): process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE) output, _error = process.communicate() + output = output.decode() return float(output[output.index('=') + 1:output.rindex("'")]) From dc633dfb1034e4158aaa3b5bf9e579711728c1d5 Mon Sep 17 00:00:00 2001 From: Richard Hayler Date: Sat, 3 Aug 2019 20:48:26 +0100 Subject: [PATCH 3/3] Update luftdaten.py added decoding of bytestring to provide Python3 compatibility. --- examples/luftdaten.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/luftdaten.py b/examples/luftdaten.py index 4d3d49a..99a40c0 100755 --- a/examples/luftdaten.py +++ b/examples/luftdaten.py @@ -73,6 +73,7 @@ def read_values(): def get_cpu_temperature(): process = Popen(['vcgencmd', 'measure_temp'], stdout=PIPE) output, _error = process.communicate() + output = output.decode() return float(output[output.index('=') + 1:output.rindex("'")])