Alternatives to Tkinter

In addition to Tkinter, there are several other popular Python GUI toolkits. Most popular ones include wxPython, PyQt, PySide, and PyGTK. Here's a brief discussion on these toolkits.

wxPython

wxPython is aPython interface to wxWidgets, a popular open source GUI library. Code written in wxPython is portable across most major platforms such as Windows, Linux, and Mac OS X.

The wxPython interface is generally considered better than Tkinter at building more complex GUIs primarily because it has a large base of natively supported widgets. However, Tkinter supporters do contest this claim.

The wxWidgets interface is originally written in C++ programming language, and hence, wxPython inherits a large portion of the complexity that is typical of C++ programs. wxPython provides a very large base of classes, and it often takes more code to produce the same interface than it would take in Tkinter. However, in exchange for this complexity, wxPython provides a larger base of built-in widgets than Tkinter. Moreover, some people prefer the appearance of wxPython widgets over that rendered by Tkinter.

Owing to its inherent complexity, wxPython has seen the emergence of several GUI builder toolkits, such as wxGlade, wxFormBuilder, wxDesigner, and so on.

The wxPython installation comes with demo programs that can help you get started with the toolkit quickly. To download the toolkit or for more information on wxPython, visit the following link:

http://wxpython.org/

PyQt

PyQt is a Python interface of the cross-platform GUI toolkit Qt, a project currently developed and maintained by British firm Riverbank Computing.

PyQt, with several hundred classes and thousands of functions is perhaps the most fully-featured GUI library that is currently available for GUI programming in Python. However, this feature load brings in a lot of complexity and a steep learning curve.

Qt (and hence pyQt) has a very rich set of supported widgets. In addition, it includes built-in support for network programming, SQL databases, threads, multimedia framework, regular expressions, XML, SVG, and much more. The designer feature of Qtletsus generates GUI code from a WYSIWYG (What You See Is What You Get) interface.

PyQt is available under variety of licenses including GNU, General Public License (GPL), and commercial license. However, its greatest disadvantage is that unlike Qt, it is unavailable under the LGPL.

PySide

If you are looking for a LGPL version of Qt bindings for Python, you may want to explore PySide. PySide was originally released under the LGPL in August 2009 by Nokia, the former owners of the Qttoolkit . It is now owned by Digia. More information on PySide can be obtained from the following link:

http://qt-project.org/wiki/PySide

PyGTK

PyGTK is a collection of Python bindings for the GTK + GUI library. PyGTK applications are cross-platform, and can run on Windows, Linux, MacOS X, and others. PyGTK is a free software and licensed under the LGPL. You can therefore use, modify, and distribute it with very little restrictions.

More information about PyGTK can be obtained at the following link:

http://www.pygtk.org/

Other Options

Besides these most popular toolkits, there is a range of toolkits available for GUI programming in Python.

Java programmers who are comfortable with Java GUI libraries, such as swing and AWT, can seamlessly access these libraries by using Jython . Similarly C# programmers can use IronPython to access GUI construction features from the .NET framework.

For a comprehensive list of other GUI tools available to a Python developer visit this link:

http://wiki.python.org/moin/GuiProgramming

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.17.12