Some common GUI parsing in Python

Source: Internet
Author: User
Tags qt designer

In Python, the steps to get started with GUI programming are not complicated, but they require users to start making some choices. As a general-purpose programming language, there are interpreters available for every common operating system, so creating a graphical user interface is not a difficult task for Python. Programmers can have a lot of choices, and the real challenge is how to create a simple way for users to interact with the program.
There are several commonly used GUIs in Python, which we will parse.
1, Tkinter

If a package can be called "Python's standard GUI toolkit," then it must be tkinter. The Tkinter is a TCL/TK package, a popular graphical interface introduced in the early 90. The advantage of choosing Tkinter is that it has a lot of resources, including books and code samples, as well as an active user community, and if you have any questions, community members may be able to help you. In addition, there are a number of simple introductory examples, and they are very readable.

Tkinter can use a Python license on top of the TCL/TK BSD license.
It can be easily and conveniently used without the need to install Tkinter in Python.
For example:

Only when programming
Import Tkinter
Import Tkinter.messagebox

2、wxPython

Wxpython brings the wxwidgets cross-platform GUI library, which enables native C + + to be introduced into Python. Wxpython is a slightly more modern approach that looks closer to the native than Tkinter on different operating systems because it does not attempt to create its own set of widgets. It's easier to get started, and developers in the community are growing, but it's important to note that you might need to bundle Wxpython with your application because it won't automatically install with Python.

Wxpython uses the Wxwindows Library license for its parent project.
This needs to be installed before you can use the

Need to import when programming
Import WX
For example:

3、PyQt

PYQT implements the popular Qt library, which opens up the possibility of developing applications in Python, and develops applications that have a familiar look and feel on other platforms.

PYQT can take advantage of the powerful tools and resources of the community, which have the dual license of commercial and GPL, and unlike the QT project, the major companies that support PYQT provide license FAQs that help programmers understand what this means for the application. PYQT3 supports Qt1 to QT3. PYQT4 supports QT4,PYQT5 support QT5. It was first released in 1998, but it was called PYKDE, because sip and pyqt were not separated at the beginning. PYQT is written in sip. PyQt is available in both GPL and commercial versions. QT is also an open-source GUI library, with a class library of around 300 and more than 5,700 functions in Qt. QT is also suitable for large applications, and its own QT designer allows us to easily build interface elements.
Using PYQT in Python requires installation and configuration
Installation:
1. Install with pip command

2, if you want to design easily, you can also install Pyqt5-tools

For example:

4、EasyGuiEasyGui是Python用于简单开发图形化界面的类库,不需要安装即可使用。编程时导入import easygui例如实现效果:

当然还有别的GUI,例如pyGtk、Jython、MFC、PythonCard、Dabo、AnyGui、WPY、IronPython等等。   

I think for tkinter is every person who originally engaged in C should understand and learn the GUI library, because it is very light, small applications can use it to do, and for larger applications can be used Pygtk,pyqt,wxpython or pythoncard to do, so, Can not only focus on the cohesion of knowledge, can also be quickly selected GUI for the development of software.

Some common GUI parsing in Python

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.