Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 06:33 Bob van der Poel, wrote: > Oh, now we get the rational. No thank you! Enough of the world is hidden > away as it is. > Zipapp was introduced for a reason, .jar for a reason. This proposal also adds in the ability of the interpreter to notify of new Python releases. > -

Re: Python, Be Bold!

2020-01-02 Thread Bob van der Poel
Oh, now we get the rational. No thank you! Enough of the world is hidden away as it is. On Thu, Jan 2, 2020 at 7:22 PM Abdur-Rahmaan Janhangeer < arj.pyt...@gmail.com> wrote: > One of the advantages of single "executable"s is the abstraction of > details. You don't want users to see what you incl

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 02:50 Barry Scott, wrote: > Expect for trivial programs you cannot distribute a single file python exe > for windows. > You can, PyInstaller does it. You can have folder-based or single file apps As you found zipapp is not a solution. > Zipapp is a good candidate. Proposin

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
One of the advantages of single "executable"s is the abstraction of details. You don't want users to see what you included. It's an attempt at hiding away details for aesthetic purposes. The second reason is compression. You get a lighter program. The third reason is to be as reverse-engineer resis

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 02:49 Grant Edwards, wrote: > > Definitely. > > Single file executables aren't really "a thing" on Windows. > This proposal is about a .jar like file executable, not native executables > -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 01:43 Michael Torrie, wrote: > On 1/2/20 2:11 PM, Abdur-Rahmaan Janhangeer wrote: > > But single file are better suited for distribution. > > Maybe. Most windows applications are distributed with installers. I've > made several bundles over the years with Nullsoft's installe

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 01:43 Chris Angelico, wrote: > > Wait, so as well as the single file, you ALSO need a Python > interpreter? Then what's the point? Why not just distribute a .py > file? > Well let's say a Flask, Django or PyQt app, a single file is not really feasible. > -- https://mail.pyt

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 03:35 mm0fmf, wrote: > On 02/01/2020 09:41, Abdur-Rahmaan Janhangeer wrote: > > i wonder who uses windows > > > > I do. The man pays me well to write software for Windows and Linux and I > don't care which . It's just an OS, write the code to do what the spec > says. Not a dif

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 03:25 Greg Ewing, wrote: > It looks like what the OP is after already exists: > > https://docs.python.org/3/library/zipapp.html > > "This module provides tools to manage the creation of zip files > containing Python code, which can be executed directly by the Python > interpre

Re: Python, Be Bold!

2020-01-02 Thread mm0fmf
On 02/01/2020 09:41, Abdur-Rahmaan Janhangeer wrote: i wonder who uses windows I do. The man pays me well to write software for Windows and Linux and I don't care which . It's just an OS, write the code to do what the spec says. Not a difficult concept really. apt-get works fine for me on

Re: Python, Be Bold!

2020-01-02 Thread Greg Ewing
It looks like what the OP is after already exists: https://docs.python.org/3/library/zipapp.html "This module provides tools to manage the creation of zip files containing Python code, which can be executed directly by the Python interpreter." -- Greg -- https://mail.python.org/mailman/list

Re: Python, Be Bold!

2020-01-02 Thread Barry Scott
> On 2 Jan 2020, at 21:17, Abdur-Rahmaan Janhangeer > wrote: > > On Fri, 3 Jan 2020, 01:05 Chris Angelico, wrote: > >> >> They are still FAR better than trying to create a single bloated >> executable that contains everything and magically knows how and when >> to update itself. >> > > P

Re: Python, Be Bold!

2020-01-02 Thread Grant Edwards
On 2020-01-02, Michael Torrie wrote: > On 1/2/20 2:11 PM, Abdur-Rahmaan Janhangeer wrote: >> But single file are better suited for distribution. > > Maybe. Most windows applications are distributed with installers. Definitely. Single file executables aren't really "a thing" on Windows. > [...]

Re: Python, Be Bold!

2020-01-02 Thread Chris Angelico
On Fri, Jan 3, 2020 at 8:17 AM Abdur-Rahmaan Janhangeer wrote: > > > > On Fri, 3 Jan 2020, 01:05 Chris Angelico, wrote: >> >> >> They are still FAR better than trying to create a single bloated >> executable that contains everything and magically knows how and when >> to update itself. > > > Prop

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 2:11 PM, Abdur-Rahmaan Janhangeer wrote: > But single file are better suited for distribution. Maybe. Most windows applications are distributed with installers. I've made several bundles over the years with Nullsoft's installer builder. That's how commercial companies, including those

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 01:05 Chris Angelico, wrote: > > They are still FAR better than trying to create a single bloated > executable that contains everything and magically knows how and when > to update itself. > Proposing to freeze things. You distribute a version of the program. The single file

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 01:01 Michael Torrie, wrote: > > But a jar file is not executable on Windows and never has been. Maybe it can > be opened with a file association linking it to a Java runtime > executable. > That's it. See UMLet's distribution mode for example As Chris said with file

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 00:58 Chris Angelico, wrote: > > I linked you to a single file executable of mine. It makes use of... > oh hey, the system package manager. See? It works. > I don't understand this one > -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, Be Bold!

2020-01-02 Thread Chris Angelico
On Fri, Jan 3, 2020 at 7:58 AM Michael Torrie wrote: > > On 1/2/20 1:33 PM, Chris Angelico wrote: > > 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

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 1:42 PM, Abdur-Rahmaan Janhangeer wrote: > I am not proposing native executables, but a .jar like executable. The term > executable refers to one click run. But a jar file is not executable on Windows and never has been. You can't go to the cmd.exe window and type "myprogram.jar." Mayb

Re: Python, Be Bold!

2020-01-02 Thread Chris Angelico
On Fri, Jan 3, 2020 at 7:54 AM Abdur-Rahmaan Janhangeer wrote: >> >> 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. > > > Not proposing only executable but single file executable. > I lin

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 1:33 PM, Chris Angelico wrote: > 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. Except that it's not actually a solved probl

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
> > 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. > Not proposing only executable but single file executable. > -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, Be Bold!

2020-01-02 Thread Chris Angelico
On Fri, Jan 3, 2020 at 7:42 AM Abdur-Rahmaan Janhangeer wrote: > > > > On Fri, 3 Jan 2020, 00:33 Chris Angelico, 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 goo

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 00:33 Chris Angelico, 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

Re: Python, Be Bold!

2020-01-02 Thread Chris Angelico
On Fri, Jan 3, 2020 at 7:22 AM Abdur-Rahmaan Janhangeer wrote: > > On Fri, 3 Jan 2020, 00:14 Chris Angelico, wrote: >> >> >> What do you mean by "Python-specific executable"? > > > a Python equivalent of .jar A jar is just an archive of Java class files. It's approximately equivalent to a zip fi

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
On Fri, 3 Jan 2020, 00:14 Chris Angelico, wrote: > > What do you mean by "Python-specific executable"? > a Python equivalent of .jar > Your Python code can go anywhere if you package it up in, say, a .deb > or .rpm, Not everybody uses Linux I > don't understand how "run on any device" relat

Re: Python, Be Bold!

2020-01-02 Thread Chris Angelico
On Fri, Jan 3, 2020 at 6:39 AM Abdur-Rahmaan Janhangeer wrote: > Having a Python-specific executable allows you to go to whatever length you > desire to make project bundling an easy task. The other effort is to get > your interpreter/VM running on as many hardwares as possible. This includes > th

Re: Friday Finking: Source code organisation

2020-01-02 Thread DL Neil via Python-list
On 3/01/20 7:36 AM, Terry Reedy wrote: On 1/2/2020 2:46 AM, Cameron Simpson wrote: Inline code under the if...__main__ stuff cannot be called as a function; Which makes it difficult to test app startup. I usually consider the main() function a reusable component. Which, if called (at leas

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
Coincidentally, one day before i posted this approach, a user posted on Idle-dev: [Idle-dev] Wishlist: Make executables + startup option which proposes the idea of adding an option to generate a single executable from Idle. It reflects the profound desire of the community to distribute their apps

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
Oh auto-3rd party modules is a mess. Suggesting updating only the interpreter. We can have a pre-scan which warns the user that upgrading will make the following packages no longer compatible. But that's one aim of venvs i think, is to confine packages to projects, not to the interpreter. No java

Re: Friday Finking: Source code organisation

2020-01-02 Thread Terry Reedy
On 1/2/2020 2:46 AM, Cameron Simpson wrote: Inline code under the if...__main__ stuff cannot be called as a function; Which makes it difficult to test app startup. I usually consider the main() function a reusable component. Which, if called (at least optionally) with a list of string argu

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 2:41 AM, Abdur-Rahmaan Janhangeer wrote: > i wonder who uses windows If this kind of thing is important to a user , what you propose would probably be the responsibility of the entity that is producing a Python distribution, such as Anaconda. Usually in such cases these distributions ar

Re: Python, Be Bold!

2020-01-02 Thread Abdur-Rahmaan Janhangeer
i wonder who uses windows On Thu, 2 Jan 2020, 12:38 Chris Angelico, wrote: > On Thu, Jan 2, 2020 at 6:20 PM Abdur-Rahmaan Janhangeer > wrote: > > > > if not self-updating, at least the ability to update > > > > That's a package manager's job. > > $ sudo apt update > $ sudo apt upgrade > > Job d

Re: Python, Be Bold!

2020-01-02 Thread Chris Angelico
On Thu, Jan 2, 2020 at 6:20 PM Abdur-Rahmaan Janhangeer wrote: > > if not self-updating, at least the ability to update > That's a package manager's job. $ sudo apt update $ sudo apt upgrade Job done. The wheel does not need to be reinvented. ChrisA -- https://mail.python.org/mailman/listinfo