def rfidEvent(self, rfid_str): # Guard: This widget has focus? if not self._tabHasFocus(): return e = KeyEmulator() e.sendInput(rfid_str)
def barcodeSubmitClicked(self): str = self.barcode_line.text() e = KeyEmulator() self.main_window.activateWindow() e.sendInput(str) e.sendKeyPress("Return") e.sendKeyRelease("Return") print "barcode submit clicked"