# -*- coding: utf-8 -*- from serialEscPos import serialEscPos ser = serialEscPos() def printReport(waiter, total): ser.doubleStrike(1) ser.underline(1) ser.centre() ser.println(u'ОТЧЕТ'.encode('cp866', 'ignore')) ser.println("") ser.println(waiter.upper().encode('cp866', 'ignore')) ser.centre() ser.underline(0) ser.println("") ser.println(str("{0:.2f}".format(total)) + u' лв.'.encode('cp866', 'ignore')) ser.println("") ser.println("") ser.println("")
# -*- coding: utf-8 -*- from serialEscPos import serialEscPos ser = serialEscPos() def printReport(waiter, total): ser.doubleStrike(1) ser.underline(1) ser.centre() ser.println(u'ОТЧЕТ'.encode('cp866', 'ignore')) ser.println("") ser.println(waiter.upper().encode('cp866', 'ignore')) ser.centre() ser.underline(0) ser.println("") ser.println( str("{0:.2f}".format(total)) + u' лв.'.encode('cp866', 'ignore')) ser.println("") ser.println("")
import serialEscPos,twitter,time rp = serialEscPos.serialEscPos() api = twitter.Api() got = {} latest=0 searchterm = "" slipprint = False starttime = time.time() stopbeforeprint = True def printstatus(status): global got,rp if status.id in got: return got[status.id] = status.id if stopbeforeprint: print "In stop before print mode. Won't actually print.\n" return rp.doubleStrike(1) rp.underline(1) rp.centre() rp.println("@" + unicode(status.user.screen_name).encode('ascii', 'ignore')) rp.left() rp.doubleStrike(0) rp.underline(0) rp.println(unicode(status.text).encode('ascii', 'ignore')) rp.println("") def prime(term):