On Sat, Feb 27, 2021 at 01:04:08AM +0000, Oscar Benjamin wrote: > On Fri, 26 Feb 2021 at 23:06, Jim J. Jewett <jimjjew...@gmail.com> wrote: > >
> > I think his point is that most of his students (economics or > > business, rather than comp sci) will never need to use Perl or C or > > Java. Python is friendly enough to be useful, but this is still a > > major pain point. > > Thanks Jim, that is the situation and yes they are not CS students. Why is that relevant? I'm not an automotive engineer, I haven't studied for an Automotive Engineering Technology (AET) bachelor degree, but I still need to know how to change a flat tire, fill the petrol tank with fuel, keep the windscreen wiper water tank filled, put snow chains on if I live in a region with snow, etc. Or pay somebody else to do it. Python is not Scratch. It doesn't, and shouldn't, aim to be a self-contained environment that isolates the user from their own computer. [Aside: the Scratch interpreter will actually refuse to run if it thinks your code or documentation includes "bad words": https://i.redd.it/nyqra8lmbei21.png https://scratch.mit.edu/discuss/topic/32001/ https://scratch.mit.edu/discuss/topic/122410/ If this doesn't make you want to take off and nuke the entire planet from orbit, then I don't know what's wrong with you. End of rant.] It doesn't matter whether you are using Windows, Mac OS X or Linux, whether your preferred UI is the command line or point-and-click, there are some basic fundemental skills that every amateur or professional programmer needs to know, such as: - how to edit files and save them - which file am I actually running? - which interpreter am I actually running? - how do I tell the computer to use a different interpreter? These should be basic pre-requisites before learning to code, like being able to read and write. [...] > I see that the official Python tutorial now suggests typing > "python3.9" [1]. Is that what is recommended now? Obviously that would > fail for someone who had installed 3.8. It isn't elitist to expect that, at the barest minimum, any student of programming should be able to adjust the command python3.9 hello.py to python3.8 myscript.py as required. If you can't debug python3.9: command not found or can't open file '/home/steve/hello.py': [Errno 2] No such file or directory then you're probably going to have a miserable time dealing with *hard* bugs. Other more subtle errors may require a bit more knowledge, but that's okay. We don't need to make programming a knowledge-free activity. > The other point though is that it doesn't need to be like this. If the > issue was just installing Python and then setting up your PATH then > that's manageable. The problem is that even after doing those things > there isn't a "one way" to invoke Python from the command line. All > possible invocations (python, python3, py, ...) will fail for some > users. That's a problem for beginners but it's also a problem in any > situation where you want to write a command line that should run on > multiple platforms (e.g. in a Makefile or some other kind of script). Writing code to run on any platform is a hard problem that requires complex solutions. If you need to write a makefile that will run on a million different flavours of Unix, including rare, old and weird ones, then you have to expect that's a hard problem and you're probably going to need to spend some effort getting it to work. Not every problem is capable of being solved by a beginner with no knowledge, and we don't have to bust our guts to make it an easy problem. It's okay to delegate some problems to someone else, such as make experts. > It would be great if Python could converge around a single way for > users to invoke the Python that they have installed ... > py also has features for selecting different versions I don't think that "py --someoption ..." is any better than the existing solutions I already have for selecting different versions. Maybe on Windows? I don't know how it works there. -- Steve _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/PPVEFLOVZERTPRHBBAL4IYJHTCZJXOGN/ Code of Conduct: http://python.org/psf/codeofconduct/