How to position infinite loops for tkinter and paho-mqtt-client? How to position infinite loops for tkinter and paho-mqtt-client? tkinter tkinter

How to position infinite loops for tkinter and paho-mqtt-client?


If an event loop already exists then loop_forever() should not be used but loop_start():

# ...root = Tk()client = mqtt.Client()client.on_connect = on_connectclient.on_message = on_messageclient.connect("test.mosquitto.org", 1883, 60)client.loop_start()app = App(root)root.mainloop()