In [1]:
from cts2000 import CTS2000
from cts2000.const import *

In [2]:
p=CTS2000(usbDevice='/tmp/printer')


Connected to /tmp/printer in text mode

In [5]:
p=CTS2000(serialDevice="/dev/ttyUSB0")

In [46]:
p.echo('coucou')
p.feed()
p.cut()

In [9]:
p.select_font(FONT.B_9x24)
p.select_charset(CHARSET.FRANCE)
p.select_character_code_table(CHARTABLE.PC437)
p.write("\x1b\x47\x01")
p.echo("Bienvenue au carrefour numérique²")
p.echo("=================================")
p.print_pbm_image('/opt/pbm/coccinelle.pbm',0)
p.cut()

In [7]:
p.beep()
p.select_charset(CHARSET.FRANCE)
p.select_character_code_table(CHARTABLE.PC437)
p.select_font(FONT.C_8x16)
p.double_strike()
p.echo("Bienvenue au carrefour numérique²")
#p.print_pbm_image('/opt/pbm/had.pbm',0)
p.double_strike(False)
p.echo("Bienvenue au carrefour numérique²")
#p.print_pbm_image('/opt/pbm/had.pbm',0)
p.beep()
p.cut()

In [52]:
print('\x47')


G

In [4]:
p.print_pbm_image('/opt/pbm/fablab16.pbm',0)