Skip to content

gh-82073: Use space indents in IDLE Shell - #25678

Merged
terryjreedy merged 4 commits into
python:masterfrom
terryjreedy:indent
Apr 29, 2021
Merged

terryjreedy merged 4 commits into
python:masterfrom
terryjreedy:indent

Conversation

@terryjreedy

@terryjreedy terryjreedy commented Apr 28, 2021 •

Copy link
Copy Markdown
Member

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.

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.
@terryjreedy terryjreedy added the type-bug An unexpected behavior, bug, or error label Apr 28, 2021
@terryjreedy terryjreedy self-assigned this Apr 28, 2021
@terryjreedy
terryjreedy requested a review from taleinat April 28, 2021 04:39
@terryjreedy

Copy link
Copy Markdown
Member Author

@taleinat I hope I am not surprising you too much. Unless you find reason why not, I am inclined to merge this tomorrow and leave it to you to merge this in with master, add a toggle*, and test that this works with sidebar toggled off. Or make the 3 little changes to the other PR to test. Or I will tomorrow (it is 2:40 am here).

  • for the beta, I think we can skip configdialog, and instead add something like the following to the startup message.
Enter a statement on the line *after* the last '>>>' prompt.  Indents will be spaces instead of tabs.
Or hit Alt-? to try out the new Shell sidebar.  Doing so will clear this window.

Then switch to this addition.

Enter a statement to the right of the last '>>>' prompt.  But indents will be spaces instead of tabs.
Or hit Alt-? to return to the prompt above input mode.  Doing so will clear this window.

Actually, I intend to revise the current mostly useless help message. It could instead be removed and permanently replaced with something more useful. People should know about Help -> About.

@terryjreedy

Copy link
Copy Markdown
Member Author

For beta, we might mention sending feedback to idle-dev@python.org. (I just posted to that address to test and it worked.)

@gvanrossum

Copy link
Copy Markdown
Member

I tried this too. I think I have a slight preference for Tal's version (with the prompts in the margin) because in his version it's easier to distinguish input from output that way, and because it's easier to copy/paste blocks of code that span multiple prompts.

@terryjreedy

Copy link
Copy Markdown
Member Author

Shell with sidebar looks even better with proper indents.

@taleinat

taleinat commented May 1, 2021

Copy link
Copy Markdown
Contributor

@terryjreedy, this is great! (Sorry for not getting to comment on this earlier.)

I'm pleasantly surprised that this simple change appears to "just work" so nicely.

@terryjreedy

Copy link
Copy Markdown
Member Author

please merge origin/master into your branch to include this, and the test fix.

@terryjreedy terryjreedy changed the title bpo-37892: Use space indents in IDLE Shell gh-82073: Use space indents in IDLE Shell Sep 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants