Python, Be Bold!

Chris Angelico rosuav at gmail.com
Thu Jan 2 15:46:15 EST 2020


On Fri, Jan 3, 2020 at 7:42 AM Abdur-Rahmaan Janhangeer
<arj.python at gmail.com> wrote:
>
>
>
> On Fri, 3 Jan 2020, 00:33 Chris Angelico, <rosuav at gmail.com> wrote:
>>
>> A jar is just an archive of Java class files. It's approximately
>> equivalent to a zip file of .pyc files.
>
>
> Exactly the idea, that's why i said zipapp might be a good candidate
>
>> No, but there are package managers for Windows and Mac too. (I don't
>> think there's any first-party package manager for Macs, but there are
>> some very popular third-party ones eg Homebrew.)
>>
>> ...
>>
>> And that's the problem: the single-file executable requires you to
>> bundle everything, update it yourself, and duplicate all the code
>> everywhere.
>>
>> Using a package manager means you have ONE copy of the Python
>> interpreter, and all your scripts depend on it. If you update that
>> interpreter, ALL scripts benefit from the update. This is a solved
>> problem.
>
>
> I am not proposing native executables, but a .jar like executable. The term executable refers to one click run.
>

Then we already have this. On Windows, set your file associations
appropriately. On Unix-like platforms, have a shebang at the start,
and chmod it +x. Example:

https://github.com/Rosuav/shed/blob/master/steamguard

ChrisA


More information about the Python-list mailing list