From d6062c714ef242c61455e000b553259cf05f15e5 Mon Sep 17 00:00:00 2001 From: samerbam Date: Tue, 22 Aug 2023 23:17:40 -0400 Subject: [PATCH] print wordsearch words --- application/thermal_print.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/thermal_print.py b/application/thermal_print.py index 5dc9c37..5c5107b 100644 --- a/application/thermal_print.py +++ b/application/thermal_print.py @@ -34,6 +34,7 @@ from escpos.printer import Usb import usb from wonderwords import RandomWord from datetime import datetime +import textwrap from .sudoku_generator import * @@ -103,6 +104,11 @@ class ThermalPrinter(): self.p.set(align="center") self.p.text(''.join(x) + "\n") + wwords = textwrap.wrap(' '.join(words), 32) + for word in wwords: + self.p.set(align="left") + self.p.text(word) + # Defaults.NOUNS: Represents a list of nouns # Defaults.VERBS: Represents a list of verbs # Defaults.ADJECTIVES: Represents a list of adjectives