apps dev in cross-platform python · develop desktop cross platform apps. many distribution...
TRANSCRIPT
![Page 1: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/1.jpg)
Cross-Platform Apps Dev in
Python2013: Back to the desktop
http://www.gmvault.org
EuroPython 2013
![Page 2: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/2.jpg)
Guillaume Aubert : Creator of Gmvault
: @zoobert
: gaubert
http://www.gmvault.org
![Page 3: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/3.jpg)
Future of Python ?- Have to seriously think on the future of Python- Strong in the scientific community
- Web Backend: Was and still strong but● HTML5/javascript will soon everwhere
- Server Side, New comer: go lang, ...
- Python doesn't want to be the next Fortran
![Page 4: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/4.jpg)
Find new areas of growth for
Python
![Page 5: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/5.jpg)
Develop Desktop Cross Platform
Apps
![Page 6: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/6.jpg)
Many distribution platforms
![Page 7: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/7.jpg)
Many distribution platforms
![Page 8: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/8.jpg)
Many distribution platforms
![Page 9: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/9.jpg)
Why is Python a valid candidate ?
![Page 10: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/10.jpg)
- Interpreter identically running on the main platforms
Win 32, Windows 8, Mac OSX and Linux
Develop once run everywhereHmm reminds me of something !
Python fulfilling 90's Promise
![Page 11: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/11.jpg)
Can access OS functions - Support for Posix API on all systems
- Filesystem API is the C one: simplest abstraction to a file system
● os module for operations on files and dirs● os.path to do path resolution
- System Environment variables supported● important for easily configuring your app● os.env("HOME")
![Page 12: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/12.jpg)
Posix Included - Support for Processes
● fork, execv, spawn
Support for IPC● Pipes, shared memory
- Support for Threads● ok to run a GUI loop and associated treament in parallel
![Page 13: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/13.jpg)
But not always sufficient !- Underlying file systems differ and Windows Filesystem is ... troublesome
- Stupidly slow when it comes to read directory contents
- On Linux: 2 sec to list 250K emails over 50 Dirs while more than 30 sec on Win
● Gmvault has a lazy read function and caching strategy for the emails
![Page 14: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/14.jpg)
Extend it if needed- Can access the C/C++ libs on Win and Lin
● call up DLLs and C libs
- ctypes is excellent for prototyping
- Can access objC libs with pyobjc
- Means that you will not be cross-plateform
![Page 15: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/15.jpg)
What is missing ?
![Page 16: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/16.jpg)
Graphical Interfaces
- Cross plateform- Native UI- Powerful (multiple widgets)- lively community around these frameworks
![Page 17: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/17.jpg)
But ...
![Page 18: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/18.jpg)
The Obvious
● Build UI with what you know● Don't want to learn a new framework● Easier to transform your App in a SaaS
![Page 20: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/20.jpg)
nodewebkit: My Choice● use chromium for rendering
● use nodejs for the UI backend
● Python for the business part
● more DIY but more freedom
+
![Page 21: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/21.jpg)
Packaging Tools- Packaging is critical to provide an easy install
- PyPi with pip + virtualenv is fantastic● Why do I have to install setuptools (ez_setup.py) to install pip
- This is for Nerds and Geeks
- Can offer that kind of packaging for Linux
![Page 22: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/22.jpg)
Packaging Tools (ctd.)- For Windows, you need a self-contained package
- You can package python.exe in your distribution but it is tedious
- Build an executable including all Python assets (interpreter, modules)
- This is done with py2exe (http://www.py2exe.org/)
![Page 23: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/23.jpg)
Packaging Tools (ctd.)- py2exe is dying
- Not been updated since 2008
- You need to be a Google search guru to find the documentation
![Page 24: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/24.jpg)
Packaging Tools
Need somebody in this room to start working on it !!
The Python community needs you !
![Page 25: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/25.jpg)
Open Source Dev Experience
![Page 26: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/26.jpg)
Start Open Sourcing now
http://www.gmvault.org
![Page 27: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/27.jpg)
Start Open Sourcing now
Kill Your Television (Ned's Atomic Dustbin)
![Page 28: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/28.jpg)
Open Source Now !- Your own personal tailored training- Your CV will shine- Incredibly rewarding- Unique sense of freedom and control- Unique ideas could allow you to be financially sucessful
![Page 29: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/29.jpg)
Open Source Success Triumvira
![Page 30: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/30.jpg)
Open Source Success Tips
![Page 31: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/31.jpg)
Hacker News
![Page 32: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/32.jpg)
Thank you !
Questions ?
![Page 33: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/33.jpg)
No libs for Notification
● No cross-platform python lib for that
![Page 34: Apps Dev in Cross-Platform Python · Develop Desktop Cross Platform Apps. Many distribution platforms. Many distribution platforms. Many distribution platforms. Why is Python a valid](https://reader030.vdocuments.net/reader030/viewer/2022040409/5ec55dcb2b674962ee1eec07/html5/thumbnails/34.jpg)
nodewebkit apps example