More Related Content Similar to Creating Ubuntu apps with Qt an Python (20) Creating Ubuntu apps with Qt an Python4. 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
5. 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
6. 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
7. 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
8. 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)