Skip to content

Commit 8ec2f0d

Browse files
authored
bpo-37892: Use space indents in IDLE Shell (GH-25678)
Adding a newline to the prompt moves it out of the way of user code input, which now starts at the left margin, along with continuation lines.
1 parent f6ee4da commit 8ec2f0d

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎Lib/idlelib/NEWS.txt‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ Released on 2021-10-04?
44
=========================
55

66

7+
bpo-37892: Change Shell input indents from tabs to spaces.
8+
9+
bpo-37903: Move the Shell input prompt to a side bar.
10+
11+
bpo-43655: Make window managers on macOS and X Window recognize
12+
IDLE dialog windows as dialogs.
13+
714
bpo-43283: Document why printing to IDLE's Shell is often slower than
815
printing to a system terminal and that it can be made faster by
916
pre-formatting a single string before printing.

‎Lib/idlelib/pyshell.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -889,11 +889,11 @@ def __init__(self, flist=None):
889889

890890
OutputWindow.__init__(self, flist, None, None)
891891

892-
self.usetabs = True
892+
self.usetabs = False
893893
# indentwidth must be 8 when using tabs. See note in EditorWindow:
894-
self.indentwidth = 8
894+
self.indentwidth = 4
895895

896-
self.sys_ps1 = sys.ps1 if hasattr(sys, 'ps1') else '>>> '
896+
self.sys_ps1 = sys.ps1 if hasattr(sys, 'ps1') else '>>>\n'
897897
self.prompt_last_line = self.sys_ps1.split('\n')[-1]
898898
self.prompt = self.sys_ps1 # Changes when debug active
899899

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Indent IDLE Shell input with spaces instead of tabs

0 commit comments

Comments
 (0)