On Wed, Nov 25, 2020 at 10:29 AM Brendan Barnwell <brenbarn@brenbarn.net> wrote:
On 2020-11-24 00:05, Chris Angelico wrote:
I'm still confused what the point is of a zipapp, if it can't be a proper point and click GUI thing, and it can't use any compiled extensions. How it is it better than a console_script and a pip-installed package??
It CAN be a proper point-and-click GUI thing. You can have a fully executable Python script if it has no dependencies (just distribute a single .py file with a shebang at the top), and if you can't do that, bundle it into a .pyz with zipapp and, again, put a shebang for posix platforms. Windows, if the py.exe launcher is installed, will happily let you double-click on a .py or .pyz and it'll run just fine.
I think by "proper point-and-click GUI thing" he meant the app itself is a GUI app, not just "can be launched via the OS GUI". At least, that is what I would mean by that, and that is what can't be done without C extensions, because most GUI toolkits require C extensions.
Python ships with one GUI toolkit (Tkinter). If you can't install anything else, you at least get that. (On Linux systems, it's sometimes in a separate package, but so are other parts of Python too, so it's hard to predict. I generally assume that, if you have to depend on the standard library only, you can at least depend on python3-all or the equivalent.) ChrisA