Writing a GUI Application with Python and Py2App
Have you ever wanted to whip up a quick and dirty graphical interface for a utility you made, and give your Python script a first-class presence in your Dock? Apple doesn’t make it easy to give programs the graphical treatment without breaking out Swift/Objective-C and learning the whole Cocoa ecosystem. Fortunately, there is an easier way…
I’m the conflicted sort of computer user. One half of me loves the text-based world of terminal software, from piping data around in Bash to editing text in vim when it suits me. I’ve never touched a GUI when using Git, and I dabble in tiling window managers when I use Linux. The other half appreciates quality GUIs…and I’m certainly picky about them. I’ve been a fan of the Macintosh ecosystem since it was a minor fringe thing, and firmly believe that applications should strictly follow Apple’s Human Interface Guidelines. Applications should look and act like Mac apps first and be their own thing second.
Obviously I loathe Electron and its ilk. If I wanted my apps to feel like something other than Cocoa apps, I wouldn’t be using a Mac, would I? Over-designed web pages in a wrapper aren’t my cup of tea at all. That digression could be an article in itself, so I will spare you the ranting.
So here’s the scenario: we, as programmers, inevitably automate irritating tasks and…