File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1581,6 +1581,11 @@ msgid ""
15811581"Next enter ``b = tk.Button(root, text='button'); b.pack()``. Again, nothing"
15821582" visibly changes in standard Python until one enters ``root.update()``."
15831583msgstr ""
1584+ "IDLE 有意与标准 Python 保持区别以方便 tkinter 程序的开发。 在标准 Python 中输入 ``import tkinter as "
1585+ "tk; root = tk.Tk()`` 不会显示任何东西。 在 IDLE 中输入同样的代码则会显示一个 tk 窗口。 在标准 Python "
1586+ "中,还必须输入 ``root.update()`` 才会将窗口显示出来。 IDLE 会在幕后执行同样的方法,每秒大约 20 次,即每隔大约 50 毫秒。"
1587+ " 下面输入 ``b = tk.Button(root, text='button'); b.pack()``。 在标准 Python "
1588+ "中仍然不会有任何可见的变化,直到输入 ``root.update()``。"
15841589
15851590#: ../../library/idle.rst:850
15861591msgid ""
@@ -1590,6 +1595,9 @@ msgid ""
15901595"``mainloop()`` returns, at which time there is nothing left to interact "
15911596"with."
15921597msgstr ""
1598+ "大多数 tkinter 程序都会运行 ``root.mainloop()``,它通常直到 tk 应用被销毁时才会返回。 如果程序是通过 ``python"
1599+ " -i`` 或 IDLE 编辑器运行的,则 ``>>>`` Shell 提示符将直到 ``mainloop()`` "
1600+ "返回时才会出现,这时将结束程序的交互。"
15931601
15941602#: ../../library/idle.rst:856
15951603msgid ""
You can’t perform that action at this time.
0 commit comments