Upload
danial-behzadi
View
302
Download
0
Embed Size (px)
Citation preview
2016 Pycon Iran 2
ubuntu SDK
2016 Pycon Iran 3
Python bindings for Qt
● PyQt
● PySide
● PyOtherSide
2016 Pycon Iran 4
PyQt
● Pros– GPL license
– Qt 4 & 5
– Python 2 & 3
● Cons– Synchronous by default
– Slow startup
● Riverbank Computing in 1998● Cpython + Python code + Bindings + Qt● Python Interpreter uses Qt to display UI
2016 Pycon Iran 5
PySide
● Pros– Python 2 & 3
● Cons– Synchronous by default
– Big size (> 15 MiB)
– Slow startup
– Qt 4 only
● Nokia in 2009● Cpython + Python code + Bindings + Qt● Python Interpreter uses QML to display UI● LGPL license
2016 Pycon Iran 6
PyOtherSide
● Pros– Asynchronous calls
– Small size (< 150 KiB)
– Fast startup
● Cons– BSD license
● Thp (from Mer) in 2011● Qt Plugin + Python library● QML as frontend, uses Python as backend● Qt 5 and Python 3
2016 Pycon Iran 7
PyOtherSide Platforms● Desktop (GNU/Linux, Windows, Mac, etc.)
– Fully Supported
● GNU/Linux phones (Ubuntu, Sailfish)– Fully Supported
● Other phones– Android: Ship Python 3, Qt 5 and PyOtherSide in app
– Blackberry: Ship Qt 5 and PyOtherSide in app
2016 Pycon Iran 8
PyOtherSide API
● QML Methods
addImportPath(p)
setHandler(e, c)
importModule(n, c)
call(f, a, c)
evaluate(expr)
● QML Signals
recieved(data)
error(traceback)
● Python Module
import pyotherside
pyotherside.send(*args)
pyotherside.atexit(f)
2016 Pycon Iran 9
Sample code and explanation
Watch it live!
2016 Pycon Iran 10
Thanks!