Message278169
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 |
|
Date |
User |
Action |
Args |
2016-10-06 04:19:40 | terry.reedy | set | recipients:
+ terry.reedy, rhettinger, Saimadhav.Heblikar |
2016-10-06 04:19:40 | terry.reedy | set | messageid: <1475727580.68.0.470202174029.issue21140@psf.upfronthosting.co.za> |
2016-10-06 04:19:40 | terry.reedy | link | issue21140 messages |
2016-10-06 04:19:39 | terry.reedy | create | |
|