Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GUI Programming with Python—The Road Ahead
Search
Tzu-ping Chung
June 05, 2015
Programming
0
270
GUI Programming with Python—The Road Ahead
Talk given at PyCon APAC 2015 in Taipei, Taiwan.
Tzu-ping Chung
June 05, 2015
Tweet
Share
More Decks by Tzu-ping Chung
See All by Tzu-ping Chung
Datasets: What it is, and how it was made
uranusjr
0
170
Let’s fix extras in Core Metadata 3.0
uranusjr
0
570
Python Packaging: Why Don’t You Just…?
uranusjr
1
240
這樣的開發環境沒問題嗎?
uranusjr
9
2.7k
Django After Web 2.0
uranusjr
3
2.2k
We Store Cheese in A Warehouse
uranusjr
1
470
The Python You Don’t Know
uranusjr
17
3.2k
Python and Asynchrony
uranusjr
0
410
Graphics on Raspberry Pi with Qt 5
uranusjr
0
96k
Other Decks in Programming
See All in Programming
All(?) About Point Sets
hole
0
280
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
5
270
AIコーディングエージェント(NotebookLM)
kondai24
0
130
スタートアップを支える技術戦略と組織づくり
pospome
8
15k
『実践MLOps』から学ぶ DevOps for ML
nsakki55
2
560
20 years of Symfony, what's next?
fabpot
2
310
dnx で実行できるコマンド、作ってみました
tomohisa
0
140
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
6
2k
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
25
21k
NUMA環境とコンテナランタイム ― youki における Linux Memory Policy 実装
n4mlz
1
110
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
180
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
410
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
960
Rails Girls Zürich Keynote
gr2m
95
14k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Making the Leap to Tech Lead
cromwellryan
135
9.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
Transcript
The Future of GUI Programming with Python
Me • Call me TP • Follow @uranusjr • https://uranusjr.com
None
None
http://macdown.uranusjr.com
www. .com
Terminology • User interacts with a program through a user
interface (UI) • A UI based on images is a graphical user interface (GUI)
I want a GUI library that works. works
None
What I Want • Native UI and UX • Portability
• Ease to deploy • Pythonic API
What We Have
Tkinter • “Python’s de-facto standard GUI” • Native nowhere •
Themed Tk • Binding to Tcl/Tk • Lean, but may be lacking
Platform-specific • PyObjC on OS X (Cocoa) • Win32API on
Windows • PyGObject on Gnome (GTK+) • Native UI/UX • Needs to deploy C binding • Very weird API
Special Interpreters • .NET via IronPython (Windows) • AWT/Swing via
Jython • Weird API • Compatibility with other libraries
Binding to Third-party • PyQt and PySide to Qt •
wxPython to wxWidgets • Works quite natively • Cross-platform application code • Weird API • Needs to deploy tons of things
“Let’s Build Everything” • Kivy and Pyglet • Cross-platform application
code • Nice Pythonic API • Needs to deploy C binding • Not native (and they don’t care)
Solution UI/UX Portable API Deploy Tkinter Meh Platform-specific Meh Jython
Meh Meh Third-party Bindings Kivy / Pyglet Meh
Licensing • GPL and LGPL • Source distribution • Static
linking
So?
What I Want • Native UI and UX • Portability
• Ease to deploy • Pythonic API
The Solution (IMO) • Dynamic binding to native GUI •
CPython compatibility • No non-Python dependencies • Wrapper API on top
Native API Python API Wrapper Binding (in Python)
The Binding • Foreign function interface • libffi • ctypes
• CFFI, anyone?
Native API Python API Wrapper ctypes
Native API Python API Wrapper GTK+ ctypes PyGObject
Native API Python API Wrapper ctypes
Native API C API (e.g. CoreFoundation) Python API Wrapper ctypes
Objective-C API ctypes + wrapper
IUUQQZCFFPSHUPHB
How?
toga toga-win32 toga-cocoa toga-gtk … rubicon PyGObject ctypes Native GUI
Library
toga toga-win32 toga-cocoa toga-gtk … rubicon PyGObject ctypes Native GUI
Library
None
None
None
……
None
Difficulties • API design • Platform knowledge • UI Layout
https://github.com/pybee/toga
WHAT IF I AM INTERESTED IN SOMETHING ELSE?
Did I hear mobile?
lwn.net/Articles/640625/ You might also want to read this.
Mobile Support • API availability • The Store • “Paradigm
mismatch”
None
Python Issue #23670 Modifications to support iOS as a cross-compilation
target
None
?
None
None
None
Recap • What we have is not good enough •
Proposed solution • Python on mobile OSs
WHAT IF I AM INTERESTED IN SOMETHING ELSE?