分享

which GUI toolkits? TK vs. QT

 Foxmouse 2012-05-16
which GUI toolkits?? TK vs. QT vs. wxWidgets vs. GTK.....

First of all, you probably won't see many "real-world" GUI applications using python. Why? Most companies don't want to release the source code. Even programs such as py2exe don't really compile the python source code; the source code is simply added as a resource to the executable, and it is therefore easily extracted and modified.

Commercial programs that use python use it largely for scripting custom AI and program behaviours. Such an example is Civilization 3. The Python code actually makes calls to compiled C/C++ functions which manipulate the GUI. Using this method, the program is easily distributed and the scripting capabilities are restricted. You'll find that this is how most commercial programs using python work.

When it comes down to choosing a direct GUI library for python, my personal choice is definitely wxPython. It is still the most community-supported GUI library. If you are just programming for Linux, then pyGTK can be a good choice. I wouldn't recommend pyQT, simply because of the licensing retrictions. TK is good for small user interfaces, and the lastest version included with TCL has native theming on both Windows and Mac OS X. This updated version of TK should be included with Python 3. In the end, it is also a personal preference in relation to coding style; wxPython is very object oriented, while TK is the complete opposite, allowing for dynamic calls. You should seriously try them all out before making a final choice.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多