tkinter root.mainloop with While True loop
问题 I am using tkinter to display some labels based on voltages I am reading. However, it stops executing after one read. I have found that it is due to root.mainloop(). But I am not able to fix it. I have included my code. The root.mainloop() is located right at the end of the while True. from Tkinter import * import spidev import time import os import RPi.GPIO as GPIO import numpy GPIO.cleanup() GPIO.setmode(GPIO.BOARD) GPIO.setup(7, GPIO.OUT) GPIO.setup(11, GPIO.OUT) GPIO.setup(13, GPIO.OUT)