This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Saimadhav.Heblikar, rhettinger, terry.reedy
Date 2016-10-06.04:19:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475727580.68.0.470202174029.issue21140@psf.upfronthosting.co.za>
In-reply-to
Content
I am closing #28365 in favor of this.  As noted there, Shell is a subclass of OutputWindow is a subclass of EditorWindow, so Shell should inherit new behavior from OutputWindow instead of both from EW.

Change to the patch: I think .py should not even be a selectable option as Shell cannot be edited down to code, and it would make no sense to do so.  And anyone who did want to save as .py could select 'all types' and type '.py' explicitly.

I was thinking that filetype should be set in OutputWindow, but that does not include text files in an editor window (with editwin.ispythonsource(self.filename) False).  Another reason is that I want to change the editor class structure.

Currently. the editor window used for all files is the confusingly named PyShellEditorWindow in pyshell.py, which adds breakpoints to EditorWindow.  In long run, EditorWindow should be used for non-python editing.  The current PyShellEditorWindow should become PythonEditor and have all the attributes and methods specific to python code.  Then EditorWindow.filetypes would have .txt and *.* and .py would be added in PythonEditor.  It would also, then, not be necessary to disable code stuff in OutputWindow (like the Run menu).  (In fact, it might turn out that EditorWindow and OutputWindow would be the same, a base TextEditor
History
Date User Action Args
2016-10-06 04:19:40terry.reedysetrecipients: + terry.reedy, rhettinger, Saimadhav.Heblikar
2016-10-06 04:19:40terry.reedysetmessageid: <1475727580.68.0.470202174029.issue21140@psf.upfronthosting.co.za>
2016-10-06 04:19:40terry.reedylinkissue21140 messages
2016-10-06 04:19:39terry.reedycreate