Several GUI analysis commonly used in python

In Python, the steps to start programming with a GUI are not complicated, but they require the user to start making some choices. As a general-purpose programming language, every common operating system has an interpreter available, so creating a graphical user interface is not difficult for Python. Programmers have many options, the real difficulty is how to create an easy way for the user to interact with the program.
There are several commonly used GUIs in python, let's analyze them.
1. Tkinter

  If there is a package that can be called "Python's standard GUI toolkit", it must be Tkinter. Tkinter is a wrapper around Tcl/Tk, a popular graphical interface introduced in the early 90s. The advantage of choosing Tkinter is that it has a wealth of resources, including books and code samples, as well as an active user community whose members may be able to help you if you have any questions. Beyond that, there are plenty of simple examples to get started, and they're very readable.

  Tkinter is available under the Python license, on top of the BSD license for Tcl/Tk.
You can use it simply and conveniently in python without installing Tkinter.
For example:
Several GUI analysis commonly used in python
just
import tkinter
import tkinter.messagebox when programming

2、wxPython

  WxPython brings the wxWidgets cross-platform GUI library, which supports the introduction of native C++ into Python. WxPython is a slightly more modern approach, and it looks a lot closer to native than Tkinter on different operating systems, since it doesn't try to create its own set of widgets. It's also relatively easy to get started with and has a growing community of developers, but it's important to note that wxPython may need to be bundled with your application as it is not automatically installed with Python.

  WxPython uses the wxWindows library license of its parent project.
This needs to be installed before it can be used to
Several GUI analysis commonly used in python
program
import wx
for example:
Several GUI analysis commonly used in python

3、PyQt

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

  PyQt can take advantage of powerful tools and resources in the community, and it has a dual commercial and GPL license. Unlike the Qt project, major companies supporting PyQt provide license FAQs to help programmers understand what this means for applications. PyQt3 supports Qt1 to Qt3. PyQt4 supports Qt4 and PyQt5 supports Qt5. Its first release was also in 1998, but it was called PyKDE at the time because SIP and PyQt were not separated at the beginning. PyQt is written in SIP. PyQt is available in GPL and commercial versions. Qt is also an open source GUI library. There are about 300 class libraries and more than 5,700 functions in Qt. Qt is also suitable for large-scale applications, and its built-in qt designer allows us to easily build interface elements.
Using PyQt in python requires installation and configuration
installation:
1. Use the pip command to install
Several GUI analysis commonly used in python
2. If you want to facilitate the design, you can also install PyQt5-tools
Several GUI analysis commonly used in python
For example:
Several GUI analysis commonly used in python

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

Several GUI analysis commonly used in python

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

I think tkinter is a GUI library that everyone who used to do C should know and learn, because it is very lightweight, small applications can use it to do it, and for larger applications, you can use pyGtk, pyQt, WxPython or PythonCard to Done, in this case, you can not only focus on the connection of knowledge, but also quickly select GUI for software development.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325947561&siteId=291194637