On Sat, 27 Feb 2021 at 01:08, Oscar Benjamin <oscar.j.benja...@gmail.com> 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.
I've been in this situation with people who are professional developers (but in environments where "development" is done in a self-contained application IDE). I completely understand and sympathise with the idea that suddenly having to learn command line skills when all you'd signed up for was to learn Python is both daunting and off-putting. > 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). This is 100% true. (At least the part where you say that "it's a problem". I'm not sure if "it doesn't need to be like this" is true - can you point to a language where the command line "just works" the way you suggest?) > 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 would be great if Python could converge around a single way for > users to invoke the Python that they have installed and would want to > use. Python 2.x is beginning to fade away so python vs python3 makes > less sense now but maybe standardising on py for all platforms and > installs would be better (since py also has features for selecting > different versions and is not currently used for any "system python"). It *would* be great. I don't think there's anyone who disagrees with this point. But just thinking "it would be great" isn't of much practical use. People have been trying to fix this issue for many years (quite apart from all of the core Python debates, it's an endless, frustrating topic in the packaging community - I can't tell you how many times we've tried to come up with a good way to tell people how to invoke pip). In my view, for people learning Python in a context where command line skills are *not* the norm, it would be ideal to focus on one (or more) "integrated environment", in much the same way as no-one learns command-line R, they all use R Studio. Unfortunately, the Python community isn't good at getting behind a single solution like this, so we have IDLE, Jupyter, Spyder, and probably a host of others. The command is *hard*. People used to it tend to forget that. I know people who are good developers (in an IDE) who struggle with how to specify options to commands, and how to quote arguments. (Not surprising, as both of those depend on what OS and what shell you're using, as well as being entirely learned information - there's no "intuitive" reason why options start with a dash, or you quote with double quotes not single quotes in Windows). I don't think we should be pointing beginners at the command line *at all*. But as a community, we don't really have any better option. (Individual trainers or organisations can make their own choices, but that's not easy in the absence of a community consensus). Paul PS Having a standard "integrated environment" that people learn in has its own problems, of course, as we risk training a new generation of Python users who don't know how to use their Python code outside of that IDE, and who therefore can't work with git or automated tests, etc, etc... I'm looking at Java and the "if my IDE doesn't do it, I'm lost" mindset here. I don't know if R has fallen into a similar trap with R Studio. _______________________________________________ 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/3FEHMUITOB4CW3TFQKFBAS2AEEXJEUXE/ Code of Conduct: http://python.org/psf/codeofconduct/