bfb = 0
class shezhiThread (threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
def run(self):
shezhichuangkou()
def shezhichuangkou():
window = tkinter.Tk()
window.title("设置")
window.geometry("300x200")
window.resizable(width=False, height=False)
global secs
l2=tkinter.Label(window, width=15,text="壁纸占屏幕大小",anchor="w").place(x=75, y=100, anchor='sw')
sbx=tkinter.Spinbox(window, from_=0, to=1, increment=0.1,width=5).place(x=175, y=100, anchor='sw')
sbx.set(secs)
bn=tkinter.Button(window,text="确定",width=10,command=lambda:shezhipzwj()).place(x=100, y=150, anchor='sw')
window.mainloop()
def shezhipzwj():
cf = configparser.ConfigParser()
cf.read("config.ini")
secs = cf.get("shezhi", "bfb")
global bfb
print(bfb)
def shezhi(self):
thread2 = shezhiThread()
thread2.start()
sbx.set(secs)那里显示'NoneType' object has no attribute 'set',但是明明有set这个函数,为什么不能用,有大佬看看咋办吗