def __init__(self, window, size, options): """ Initialise and start the snackspace application """ self.inittime = int(time.time()) self.options = options self.input_handler = InputHandler() self.task_handler = TaskHandler(self) self.task_handler.add_function(self.rfid_task, 500, True) self.logger = logging.getLogger("snackspace") self.rfid = RFIDReader(self.options.rfid_port) self.is_fullscreen = True self.cursor_visible = False self.window_size = size self.screen_manager = ScreenManager(self, window, size) self.user = None self.products = [] self.reply_queue = Queue.Queue() self.dbaccess = DbClient(self.options.hostip, self.task_handler, self.db_state_callback) self.dbaccess.daemon = True self.dbaccess.start()
def __init__(self): self.task_handler = TaskHandler(self) self.dbaccess = DbClient(True, self.task_handler)