On Wed, Mar 25, 2020 at 7:29 AM Christopher Barker <python...@gmail.com> wrote:
>
> On Mon, Mar 23, 2020 at 6:19 PM Oleg Broytman <p...@phdru.name> wrote:
>>
>>
>> IMO the issue is in not following the best practices. Distribute wheels
>> or freezed binaries, not just drop scripts unto users.
>
>
> This is a good point, though I’m not sure the best solution. Frozen Binaries 
> (py2exe, PyInstaller) are a good solution if you have one or two 
> applications. But if you have a a whole bunch of small scripts, then each one 
> would have a full copy of Python -- not ideal.
>

Extremely unideal, since then it's the app publisher's responsibility
to keep on top of Python version updates and rebundle.

> 2) Provide clear instructions for users: and they WILL be different on 
> Windows and *nix.
>   - I got the impression that one problem was finger memory for users of 
> multiple OSs -- I have this problem, too. In that case, you could also make a 
> copy of py.exe. and name it python3.exe -- problem solved :-)
>  (now that i think about it, is there any reason cPython couldn't' install a 
> set of aliases (or copies, or links, or) to the py launcher called "python" 
> and "python3" ?
>

Aliasing py as python and python3 would be great, as long as that
doesn't introduce bizarrenesses of any sort. That would also work for
scripts (makefiles, 'npm run blah', etc), which AIUI was the OP's main
issue.

> 3) In scripts that can only be run in Python3, have a little check at the top 
> that makes sure it's being run in Python3, and give a meaningful message if 
> it's not:
>
>  if sys.version_info.major != 3:
>     print("You are not running the correct version of Python: please install 
> Python3,"
>           "and run this script with:\n"
>           "
>     )
>
> That leaves open the Python-ideas part of this: should the standard Python 
> installers do anything different than they do?
>

What I would really like would be for Windows to ship with a
"python.exe" and a "python3.exe" that inform the user that the script
requested requires Python, please install it from the app store. And
if it IS installed, just exec straight into py. But I'm sure this
would cause other issues somewhere.

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/K7PGCQPF6CBONJOEW5NTXFTVGO3UOZEG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to