add some debug lines
This commit is contained in:
parent
2a71d15d0b
commit
850477fd39
@ -71,9 +71,13 @@ class ThermalPrinter():
|
||||
# self.p.charcode("cp437")
|
||||
self.p.set(align="left")
|
||||
self.p.text(x[0])
|
||||
|
||||
output = []
|
||||
|
||||
if this_line_width < 32:
|
||||
for s in range((32-this_line_width)):
|
||||
self.p.text(" ")
|
||||
output.append( (" "*(32-this_line_width))+x[1] )
|
||||
# for s in range((32-this_line_width)):
|
||||
# self.p.text(" ")
|
||||
# self.p.text("" + " "*(32-this_line_width))
|
||||
else:
|
||||
# self.p.text(" ")
|
||||
@ -81,12 +85,20 @@ class ThermalPrinter():
|
||||
todo_text = textwrap.wrap(x[1], todo_text_max_len)
|
||||
# t_text = textwrap.wrap()
|
||||
|
||||
for t in todo_text:
|
||||
# self.p.text("" + " "*(len(x[0])+1) )
|
||||
for s in range((len(x[0])+1)):
|
||||
self.p.text(" ")
|
||||
self.p.text(t + "\n")
|
||||
output.append(" " + todo_text[0])
|
||||
|
||||
for t in todo_text[1:]:
|
||||
# self.p.text("" + " "*(len(x[0])+1) )
|
||||
# for s in range((len(x[0])+1)):
|
||||
# self.p.text(" ")
|
||||
|
||||
output.append( (" "*(32-(len(x[0])+1)))+t )
|
||||
|
||||
# self.p.text(t + "\n")
|
||||
|
||||
for l in output:
|
||||
print(l)
|
||||
self.p.text(l)
|
||||
|
||||
# self.p.set(align="right")
|
||||
# self.p.textln(x[1])
|
||||
|
Loading…
Reference in New Issue
Block a user