def __init__(self, root): """ Threaded Client which does the socket receiving work. We call the main GUI through here aswell. Parameters ---------- root : tkinter root object This is the passed along tk root thing """ self.root = root self.message_queue = queue.Queue() self.thread_stop = threading.Event() self.running = True self.connection_running = False self.got_length = False self.gui = BluetoothChatGUI(root, self.message_queue, self.end_gui, self.start_message_awaiting, self.end_bluetooth_connection) self.periodic_call()