The default view in IDLE is a window for Python shell, so to create a new Python file, you’ll need to use the IDLE menu. Select “New File” from the “File” menu. Figure 1: Hello World in IDLE (1). Note ...
Python 版本过旧:ImportError: cannot import name '_setup_dialog` from 'tkinter.simpledialog' 遇到这个报错,是因为 Python 版本太旧。 以 Python 3.9 为例,最新的 IDLE 3.9 所使用的 _setup_dialog 函数是在 Python 3.9.5 添加的。