@@ -1592,6 +1592,11 @@ msgid ""
15921592"Next enter ``b = tk.Button(root, text='button'); b.pack()``. Again, nothing"
15931593" visibly changes in standard Python until one enters ``root.update()``."
15941594msgstr ""
1595+ "IDLE 有意与标准 Python 保持区别以方便 tkinter 程序的开发。 在标准 Python 中输入 ``import tkinter as "
1596+ "tk; root = tk.Tk()`` 不会显示任何东西。 在 IDLE 中输入同样的代码则会显示一个 tk 窗口。 在标准 Python "
1597+ "中,还必须输入 ``root.update()`` 才会将窗口显示出来。 IDLE 会在幕后执行同样的方法,每秒大约 20 次,即每隔大约 50 毫秒。"
1598+ " 下面输入 ``b = tk.Button(root, text='button'); b.pack()``。 在标准 Python "
1599+ "中仍然不会有任何可见的变化,直到输入 ``root.update()``。"
15951600
15961601#: ../../library/idle.rst:856
15971602msgid ""
@@ -1601,6 +1606,9 @@ msgid ""
16011606"``mainloop()`` returns, at which time there is nothing left to interact "
16021607"with."
16031608msgstr ""
1609+ "大多数 tkinter 程序都会运行 ``root.mainloop()``,它通常直到 tk 应用被销毁时才会返回。 如果程序是通过 ``python"
1610+ " -i`` 或 IDLE 编辑器运行的,则 ``>>>`` Shell 提示符将直到 ``mainloop()`` "
1611+ "返回时才会出现,这时将结束程序的交互。"
16041612
16051613#: ../../library/idle.rst:862
16061614msgid ""
@@ -1609,6 +1617,8 @@ msgid ""
16091617"with the live application. One just has to remember to re-enable the "
16101618"mainloop call when running in standard Python."
16111619msgstr ""
1620+ "当通过 IDLE 编辑器运行 tkinter 程序时,可以注释掉 mainloop 调用。 这样将立即回到 Shell "
1621+ "提示符并可与正在运行的应用程序交互。 请记得当在标准 Python 中运行时重新启用 mainloop 调用。"
16121622
16131623#: ../../library/idle.rst:868
16141624msgid "Running without a subprocess"
@@ -1621,6 +1631,8 @@ msgid ""
16211631"externally visible and no data is sent to or received from the internet. If "
16221632"firewall software complains anyway, you can ignore it."
16231633msgstr ""
1634+ "在默认情况下,IDLE 是通过一个套接字在单独的子进程中执行用户代码,它将使用内部的环回接口。 这个连接在外部不可见并且不会在互联网上发送或接收数据。 "
1635+ "如果防火墙仍然会报警,你完全可以忽略。"
16241636
16251637#: ../../library/idle.rst:875
16261638msgid ""
0 commit comments