We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Metaclasses for fun and profit: Making a declarative GUI implementation

Formal Metadata

Title
Metaclasses for fun and profit: Making a declarative GUI implementation
Title of Series
Part Number
58
Number of Parts
169
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date2016
LanguageEnglish

Content Metadata

Subject Area
Genre
Abstract
Anders Hammarquist - Metaclasses for fun and profit: Making a declarative GUI implementation When overhauling the user interface of Autolabel's labeling printers, we wanted a clean way to describe the layout of the settings widgets. The structure we came up with was a declarative class layout that leverages Python's metaclass concept to build the underlying GTK widget structure. I will present the implementation to hopefully inspire you to apply metaclass techniques to problems that standard Python syntax can't quite solve. If that fails, you will at least have a way to declaratively construct GTK GUIs. A short, non-exaustive, summary of concepts I will mention includes metaclasses (obviously), class hierarchies, method resolution order, super(), and anecdotes of dealing with GTK.