Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
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
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GUI Programming with Python—The Road Ahead
Talk given at PyCon APAC 2015 in Taipei, Taiwan.
Tzu-ping Chung
June 05, 2015
More Decks by Tzu-ping Chung
See All by Tzu-ping Chung
Datasets: What it is, and how it was made
uranusjr
0
210
Let’s fix extras in Core Metadata 3.0
uranusjr
0
680
Python Packaging: Why Don’t You Just…?
uranusjr
1
280
這樣的開發環境沒問題嗎?
uranusjr
9
2.7k
Django After Web 2.0
uranusjr
3
2.3k
We Store Cheese in A Warehouse
uranusjr
1
500
The Python You Don’t Know
uranusjr
17
3.3k
Python and Asynchrony
uranusjr
0
440
Graphics on Raspberry Pi with Qt 5
uranusjr
0
96k
Other Decks in Programming
See All in Programming
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
550
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
0
400
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
190
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
380
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
270
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
200
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
180
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
210
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.7k
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
140
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
910
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.6k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
190
GitHub's CSS Performance
jonrohan
1033
470k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Everyday Curiosity
cassininazir
0
260
We Have a Design System, Now What?
morganepeng
55
8.2k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
560
Building Applications with DynamoDB
mza
96
7.1k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Six Lessons from altMBA
skipperchong
29
4.3k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
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?