python3.10版本无法运行 colorchooser,
File "G:/8.20第七课.py", line 7, in callbackfileName = colorchooser.askcolor()
NameError: name 'colorchooser' is not defined
File "G:/8.20第七课.py", line 6, in callback
fileName = filedialog.askopenfilename()
NameError: name File "G:/8.20第七课.py", line 6, in callback
fileName = filedialog.askopenfilename()
NameError: name 'filedialog' is not defined is not defined
# 开头添加这行代码
from tkinter import filedialog, colorchooser
不添加的话用不了
页:
[1]