Tcl on the surface looks a lot like Python. Both languages
can be used to write elegant, simple code. Tcl is primarily a string
processing language. The only datatypes in Tcl are strings and
one-dimensional arrays of strings.
Python, in contrast, comes with a full range of data types including
numbers (integers, long integers, floating point, octal, hex, and
complex numbers), strings, lists, dictionaries (arrays indexed by keys,
like hashes in Perl), and tuples (simple lists that can't be changed in
place).
Tcl and Python share the same GUI toolkit, Tk.
Python's interface to
Tk is called Tkinter, and it is included with all recent versions of
Python. You are not limited to using just Tk to build GUIs in Python,
however. You can also use the Gimp Tool Kit (GTK) and Gnome extensions
to GTK+.
网络摘录:Python and Tcl
最新推荐文章于 2025-12-31 23:52:26 发布
本文对比了Python和Tcl两种编程语言的特点。Tcl主要应用于字符串处理,而Python则提供了丰富的数据类型,如数字、字符串、列表、字典等。两者都使用Tk作为GUI工具包,但Python还支持GTK+和Gnome等其他GUI选项。
Python and Tcl
254

被折叠的 条评论
为什么被折叠?



