def main(): imageIn = sys.argv[1] fileOut = imageIn + "_tmp.txt" p = Dummy() p.image(imageIn) f = File(fileOut) f._raw(p.output) f.cut() subprocess.call("lpr -P THERMAL -o raw " + fileOut, shell=True) os.remove(fileOut)
def saveToText(self, fn): f = File(fn) f._raw(self.p.output) f.cut()