【发布时间】:2020-12-11 01:58:27
【问题描述】:
我想在tkinter 中创建一个toplevel widget,但是当我运行程序时它给了我一个错误。回溯会将我引向 optionDB,表明它不在我的目录中——这是真的。我在哪里可以下载或找到optionDB,它到底是什么?我也搜索了网络,但我找不到一个好的答案。我希望有人可以帮助我。
可能有其他方法可以创建toplevel widget,但我也想知道 optionDB 是什么。对不起,我还是个初学者,还不够了解。
from tkinter import *
root = Tk()
root.option_readfile("optionDB")
root.title("Toplevel")
追溯:
_tkinter.TclError: couldn't open "optionDB": no such file or directory
【问题讨论】:
标签: python python-3.x user-interface tkinter