1 说明:
=====
1.1 Pyface库由大名鼎鼎的enthought出品。
1.2 介绍:
1.2.1 英文:
traits-capable windowing framework.
The pyface project contains a toolkit-independent GUI abstraction layer,
which is used to support the "visualization" features of the Traits package.
Thus, you can write code in terms of the Traits API (views, items, editors, etc.),
and let pyface and your selected toolkit,
and back-end take care of the details of displaying them.
1.2.2 中文:
具有Traits特质的窗口框架。
pyface项目包含一个独立于工具包的GUI抽象层,
用于支持Traits包的“可视化”功能。
因此,您可以根据Traits API(视图,项目,编辑器等)编写代码,
并让pyface和您选择的工具包,
和后端负责显示它们的细节。
2 准备:
=====
2.1 官网:
https://github.com/enthought/pyfacehttps://pypi.org/project/pyface/#教程https://docs.enthought.com/pyface/https://docs.enthought.com/pyface/api/pyface.html
2.2 依靠:
The following GUI backends are supported:选择一个即可
wxPython #本机未安装
PyQt #本机安装pyqt5
PySide #本机安装pyside2
2.3 安装:
pip install pyface
3 Hello world:
===========
3.1 效果图:
3.2 代码:注释中有4种