3 ms·
For a personal project I am currently using this approach and can confirm it works great. I wrote just enough PyObjC to get myself a trayicon in the Mac menu b
by doteka 6y ago
For a personal project I am currently using this approach and can confirm it works great.
I wrote just enough PyObjC to get myself a trayicon in the Mac menu bar, which shows a popover containing a wkwebview to localhost. Then I have all the app logic in Python, exposed to the webview through a bottle server, and Svelte for the UI. Highly recommended.
- CameronNemo 6y agoDo you distribute Python with your application too then? How well does that work?
- fbelzile 6y agoIt sounds like a macOS app, and python is distributed with the OS already. Just watch out for Apple trying to take away scripting language support in the future. There's also an upcoming Python version change in macOS 10.16 to look out for.
- doteka 6y agoI actually use py2app to bundle the whole virtualenv into an .app file. Worked pretty much out of the box after fiddling a bit with pyenv (you have to build your python version with framework support).