summaryrefslogtreecommitdiff
path: root/pttarget.py
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2013-12-01 15:55:43 +0100
committerDavid Lamparter <equinox@diac24.net>2013-12-01 15:55:43 +0100
commit0516ad0b6adc3f53e62746177788ac79f1b1ada2 (patch)
tree5b7c0bb6921f93660901dc7f8eb0e417126811a5 /pttarget.py
parent89a838c7180835fd32072d98f8554a09786a1e8d (diff)
support copies, add feed+cut switch
Diffstat (limited to 'pttarget.py')
-rw-r--r--pttarget.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pttarget.py b/pttarget.py
index e0bf7ac..37f6509 100644
--- a/pttarget.py
+++ b/pttarget.py
@@ -183,8 +183,6 @@ class PTLabelData(object):
# margins: '\x1bid\x00\x00' +
self.init = '\x1biR\x01' + '\x1biM\x40' + '\x1bid\x00\x00' + '\x1biK\x00'
self.raw = ''
- # self.fini = '\x1a' # Z / feed ?
- self.fini = '\x0c'
def addpixels(self, raw):
row = 'G' + struct.pack('<H', len(raw)) + raw
@@ -215,8 +213,9 @@ class PTLabelData(object):
pixels[py / 8] |= 1 << (7 - (py & 7))
self.addpixels(pixels)
- def get(self):
- return self.init + self.raw + self.fini
+ def get(self, feedncut = True):
+ fini = '\x1a' if feedncut else '\x0c'
+ return self.init + self.raw + fini
class PTTape(object):
tapes = []