From befb47231dfa1b08af65e3cbffe33c3ecdb765ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=B0=E5=86=A2?= <49506152+BruceLee569@users.noreply.github.com> Date: Sat, 23 Apr 2022 17:02:24 +0800 Subject: [PATCH 1/2] Windows command line does not support single quotes. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit System version: Windows 10 21H2 Python version: Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] on win32 At the command-line terminal (cmd or Powershell) you have to use double quotes to enclose the argument you wish to send. Enclose it with double quotes, and use single quotes within it. (https://stackoverflow.com/a/34379661/11687405) For details, please refer to the GIF:![demo](https://gifyu.com/image/SLtLK) --- Doc/tutorial/interpreter.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst index d7f300d93b021b..84d7845a696977 100644 --- a/Doc/tutorial/interpreter.rst +++ b/Doc/tutorial/interpreter.rst @@ -52,7 +52,7 @@ A second way of starting the interpreter is ``python -c command [arg] ...``, which executes the statement(s) in *command*, analogous to the shell's :option:`-c` option. Since Python statements often contain spaces or other characters that are special to the shell, it is usually advised to quote -*command* in its entirety with single quotes. +*command* in its entirety with double quotes. Some Python modules are also useful as scripts. These can be invoked using ``python -m module [arg] ...``, which executes the source file for *module* as From 24aff3a706ef8cbc7b99d87c705b83e4136fd7a9 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 5 Oct 2022 14:57:52 -0700 Subject: [PATCH 2/2] Update Doc/tutorial/interpreter.rst --- Doc/tutorial/interpreter.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tutorial/interpreter.rst b/Doc/tutorial/interpreter.rst index 84d7845a696977..08851cb8fda012 100644 --- a/Doc/tutorial/interpreter.rst +++ b/Doc/tutorial/interpreter.rst @@ -52,7 +52,7 @@ A second way of starting the interpreter is ``python -c command [arg] ...``, which executes the statement(s) in *command*, analogous to the shell's :option:`-c` option. Since Python statements often contain spaces or other characters that are special to the shell, it is usually advised to quote -*command* in its entirety with double quotes. +*command* in its entirety. Some Python modules are also useful as scripts. These can be invoked using ``python -m module [arg] ...``, which executes the source file for *module* as