Skip to content

Commit 2b85374

Browse files
Yuheng3107encukou
andauthored
Update Doc/tutorial/interpreter.rst
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 01fd166 commit 2b85374

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Doc/tutorial/interpreter.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ Typing an end-of-file character (:kbd:`Control-D` on Unix, :kbd:`Control-Z` on
3232
Windows) at the primary prompt causes the interpreter to exit with a zero exit
3333
status. If that doesn't work, you can exit the interpreter by typing the
3434
following command: ``quit()``.
35+
The interpreter's line-editing features include interactive editing, history
36+
substitution and code completion on most systems.
37+
Perhaps the quickest check to see whether command line editing is supported is
38+
typing a word in on the Python prompt, then pressing Left arrow (or :kbd:`Control-b`).
39+
If the cursor moves, you have command line editing; see Appendix
40+
:ref:`tut-interacting` for an introduction to the keys.
41+
If nothing appears to happen, or if a sequence like ``^[[D`` or ``^B`` appears,
42+
command line editing isn't available; you'll only be able to use
43+
backspace to remove characters from the current line.
3544

3645
The interpreter operates somewhat like the Unix shell: when called with standard
3746
input connected to a tty device, it reads and executes commands interactively;

0 commit comments

Comments
 (0)