Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial: command for python -c should be consistent with main command #112146

Open
Tracked by #110383
encukou opened this issue Nov 16, 2023 · 7 comments
Open
Tracked by #110383

Tutorial: command for python -c should be consistent with main command #112146

encukou opened this issue Nov 16, 2023 · 7 comments
Labels
docs Documentation in the Doc dir

Comments

@encukou
Copy link
Member

encukou commented Nov 16, 2023

No description provided.

@encukou encukou changed the title Invoking the Interpreter with -c -- [Sierra Camper](https://mail.python.org/archives/list/docs@python.org/thread/72GVL6O6HSEHIOTX365M5ITHCDTP5UN6/) Tutorial: command for python -c should be consistent with main command Nov 16, 2023
@encukou encukou added docs Documentation in the Doc dir easy labels Nov 16, 2023
@encukou
Copy link
Member Author

encukou commented Nov 16, 2023

In https://docs.python.org/3/tutorial/interpreter.html, the main command is python3.12 but later an alternative is given: python -c command [arg] ...
Both should be the same (python3.12).

@terryjreedy
Copy link
Member

I disagree. Explain that since the actual command word needed or allowed varies by OS and installation, we use the generic 'python' except in literal code examples where something more specific is needed, and that users should interpret 'python' as needed. It might be good to explain that a now generic 'python3' may also work to get the 'latest' python3.x.

@terryjreedy
Copy link
Member

The initial statement "The Python interpreter is usually installed as /usr/local/bin/python3.12 on those machines where it is available" is unix specific and is both wrong and meaningless for the majority of beginners, the presumed target of the tutorial. Version specific statement should explicitly say so. Start with "The Python 3.12 interpreter ..." whatever the continuation.

The box with "python3.12" is wrong for Windows users who install from python.org (and maybe other places other than Microsoft store) and install the recommended way, which is to use the py launcher and not add the python3.12 directory to PATH. I believe that a majority of beginners are using Windows releases and therefore think the tutorial should not treat them as an afterthought.

@terryjreedy
Copy link
Member

A deeper problem is that 'Invoking the interpreter' only discusses starting Python from a command line, which may the the least common way beginners start Python. It ignores icons, menus, and file dialogs.

@hugovk
Copy link
Member

hugovk commented Nov 17, 2023

I believe that a majority of beginners are using Windows releases and therefore think the tutorial should not treat them as an afterthought.

We have numbers that suggest this. From the Plausible trial in July, 58.6% of visitors to the docs used Windows.

We don't know if they were beginners or tutorial visitors, but tutorial pages are amongst the most visited, so I expect many are also Windows users:

@encukou encukou removed the easy label Nov 20, 2023
@xsc27
Copy link
Contributor

xsc27 commented May 20, 2024

Is the issue now about updating the tutorial to help Windows users? I believe that issue is different than what the title says. I believe the original issue stated original title no longer an issue as I can not find the inconsistency. Should the title be changed to add a tutorial information for Windows users, or create a new issue?

@terryjreedy
Copy link
Member

The inconsistency reported by a user, between python3.12 and python, is still there. The fixup needed in more complicated then replacing either by the other. I have changed the title. I am thinking about a draft PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

4 participants