|
|
@ -9,7 +9,7 @@ import io |
|
|
|
def connect(): |
|
|
|
# Get the printer's USB initializing code with $ sudo lsbusb |
|
|
|
try: |
|
|
|
lp = printer.Usb(0x4b8,0xe15) # televex printer @ Varia |
|
|
|
# lp = printer.Usb(0x4b8,0xe15) # televex printer @ Varia |
|
|
|
lp = printer.Usb(0x4b8,0xe03) # printer @ poel |
|
|
|
except: |
|
|
|
lp = None |
|
|
@ -113,5 +113,4 @@ def print_now(output, lp=None, type=None): |
|
|
|
lp.image(output) |
|
|
|
lp.cut() |
|
|
|
else: |
|
|
|
sys.stderr.write('Printing output to the terminal:\n\n'+output+'\n\n') |
|
|
|
|
|
|
|
sys.stderr.write('Printing output to the terminal:\n\n'+str(output)+'\n\n') |
|
|
|