commit | author | age
|
bd2ed9
|
1 |
#!/usr/bin/env python |
JK |
2 |
# -*- encoding: utf-8 -*- |
|
3 |
|
|
4 |
from axiohm import Axiohm |
|
5 |
|
|
6 |
printer = Axiohm(port = '/dev/ttyS0', baudrate = 19200, xonxoff = True) |
|
7 |
|
|
8 |
print printer.getModel() |
|
9 |
print printer.getStatus() |
|
10 |
|
|
11 |
printer.reset() |
|
12 |
printer.waitForSlip() |
|
13 |
|
|
14 |
printer.feedMilimeters(100) |
|
15 |
|
|
16 |
lines = [ |
|
17 |
"Line 1", |
|
18 |
"Line 2", |
|
19 |
"Line 3" |
|
20 |
] |
|
21 |
|
|
22 |
for line in lines: |
|
23 |
printer.moveAbsoluteMilimeters(20) |
|
24 |
printer.setDoubleWide() |
|
25 |
printer.printLineUnicode(line) |
|
26 |
|
|
27 |
printer.ejectSlip() |