def __init__(self, configuration): self.__conf = configuration self._init_port() self.__readDumpTimeout = 250 # ms self.__magicTimeout = 250 # ms self.players = [] self.__queue = EventQueue()
from PIL import Image import wget import csv import datetime # Set up the printer serial Port try: # = Thermal("/dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller_D-if00-port0") #LINUX t = Thermal("/dev/ttyS8") #WINDOWS print "Printer open OK" except: print "Printer error" t = None # Create a queue that will print the tasks as soon as the enter in the queue eq = EventQueue() # Token from bot father on telegram # ejecutar /newbot # # USING ENV VARIABLES, PUT YOUR TOKEN HERE AS `API_TOKEN = "TOKEN"` API_TOKEN = os.environ['TELEBOT_TOKEN'] bot = telebot.TeleBot(API_TOKEN) user_dict = {} # Get current date for displaying in our program now = datetime.datetime.now() FECHA = str(now.day) + "/" + str(now.month) + "/" + str(now.year)