diff --git a/examples/mqtt-all.py b/examples/mqtt-all.py index ecab4a35..b4fd19ef 100755 --- a/examples/mqtt-all.py +++ b/examples/mqtt-all.py @@ -133,10 +133,10 @@ def display_status(disp, mqtt_broker): text_colour = (255, 255, 255) back_colour = (0, 170, 170) if check_wifi() else (85, 15, 15) device_serial_number = get_serial_number() - message = f"{device_serial_number}\nWi-Fi: {wifi_status}\nmqtt-broker: {mqtt_broker}" + message = f"Serial: {device_serial_number}\nWi-Fi: {wifi_status}\nmqtt-broker: {mqtt_broker}" img = Image.new("RGB", (WIDTH, HEIGHT), color=(0, 0, 0)) draw = ImageDraw.Draw(img) - x1, y1, x2, y2 = font.getbbox(message) + x1, y1, x2, y2 = draw.textbbox((0,0), message, font=font) size_x = x2 - x1 size_y = y2 - y1 x = (WIDTH - size_x) / 2 diff --git a/examples/noise-amps-at-freqs.py b/examples/noise-amps-at-freqs.py index 957511b4..75497df2 100755 --- a/examples/noise-amps-at-freqs.py +++ b/examples/noise-amps-at-freqs.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import st7735 from PIL import Image, ImageDraw diff --git a/examples/noise-profile.py b/examples/noise-profile.py index be6a1855..480815e6 100755 --- a/examples/noise-profile.py +++ b/examples/noise-profile.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import st7735 from PIL import Image, ImageDraw diff --git a/examples/sensorcommunity_combined.py b/examples/sensorcommunity_combined.py index a7aeb7b8..bb9869d6 100644 --- a/examples/sensorcommunity_combined.py +++ b/examples/sensorcommunity_combined.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import colorsys import logging import time diff --git a/install.sh b/install.sh index 61f1a4a6..d2d973a9 100755 --- a/install.sh +++ b/install.sh @@ -162,13 +162,13 @@ function apt_pkg_install { function pip_pkg_install { # A null Keyring prevents pip stalling in the background - PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring $PYTHON -m pip install --upgrade "$@" + PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring $PYTHON -m pip install --prefer-binary --upgrade "$@" check_for_error } function pip_requirements_install { # A null Keyring prevents pip stalling in the background - PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring $PYTHON -m pip install -r "$@" + PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring $PYTHON -m pip install --prefer-binary -r "$@" check_for_error }