Главная
Study mode:
on
1
Introduction
2
Goal: simple GUI definition
3
What is a metaclass?
4
Metaclass methods
5
Metaclass wrapup
6
Metaclass or not comparison
7
Attribute order metaclass
8
Widget properties metaclass
9
Instantiating widget base class
10
GTK Mixins metaclass
11
Summary
12
Code and slides
Description:
Explore metaclasses for creating declarative GUI implementations in this 40-minute EuroPython Conference talk. Dive into Anders Hammarquist's approach to overhauling user interfaces for labeling printers using Python's metaclass concept. Learn how to leverage class hierarchies, method resolution order, and super() to build clean, declarative layouts for GTK widget structures. Discover techniques for applying metaclasses to solve problems that standard Python syntax struggles with. Gain insights into attribute order metaclasses, widget properties metaclasses, and GTK Mixins metaclasses. Compare metaclass and non-metaclass approaches, and explore practical examples of instantiating widget base classes. Access accompanying slides and example code to further enhance your understanding of this powerful Python feature for GUI development.

Metaclasses for Fun and Profit - Making a Declarative GUI Implementation

EuroPython Conference
Add to list
00:00
-04:15