gh-65339: Save IDLE Shell and Output windows as text by default#152742
Open
serhiy-storchaka wants to merge 1 commit into
Open
gh-65339: Save IDLE Shell and Output windows as text by default#152742serhiy-storchaka wants to merge 1 commit into
serhiy-storchaka wants to merge 1 commit into
Conversation
Their content is not Python source, so the Save As dialog now lists text files first and defaults to a ".txt" extension.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Shell and Output windows contain shell logs and Find in Files (grep) output, not Python source, so defaulting their Save As dialog to
.pyis misleading — beginners have saved a Shell session as.pyand then hit aSyntaxErrorrunning it (see the issue).IOBindinggainstext_filetypes(text files listed first) andtext_defaultextension = '.txt'.OutputWindow.__init__switches itsioto these, and the Shell (PyShell(OutputWindow)) inherits it..pyis still selectable, just no longer the default. Terry also considered removing.pyas an option entirely for these windows; that stricter change is left out here.The added test checks that an Output window's save defaults to text.
🤖 Generated with Claude Code