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