Graphical User Interfaces with Tk使用Tk的图形用户界面

Tk/Tcl has long been an integral part of Python. Tk/Tcl长期以来都是Python不可或缺的一部分。It provides a robust and platform independent windowing toolkit, that is available to Python programmers using the tkinter package, and its extension, the tkinter.tix and the tkinter.ttk modules.它提供了一个健壮且独立于平台的窗口工具包,可供使用tkinter包及其扩展、tkinter.tixtkinter.ttk模块的Python程序员使用。

The tkinter package is a thin object-oriented layer on top of Tcl/Tk. tkinter包是Tcl/Tk之上的一个薄薄的面向对象层。To use tkinter, you don’t need to write Tcl code, but you will need to consult the Tk documentation, and occasionally the Tcl documentation. 要使用tkinter,您不需要编写Tcl代码,但需要参考Tk文档,有时还需要参考Tcl文档。tkinter is a set of wrappers that implement the Tk widgets as Python classes.是一组将Tk小部件实现为Python类的包装器。

tkinter’s chief virtues are that it is fast, and that it usually comes bundled with Python. 的主要优点是速度快,并且通常与Python捆绑在一起。Although its standard documentation is weak, good material is available, which includes: references, tutorials, a book and others. 虽然它的标准文档很弱,但有很好的资料,包括:参考资料、教程、一本书和其他。tkinter is also famous for having an outdated look and feel, which has been vastly improved in Tk 8.5. tkinter还因其过时的外观和感觉而闻名,这在Tk 8.5中得到了极大的改进。Nevertheless, there are many other GUI libraries that you could be interested in. 然而,您可能会对许多其他GUI库感兴趣。The Python wiki lists several alternative GUI frameworks and tools.Python wiki列出了几种可选的GUI框架和工具