Terry J. Reedy added the comment:

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

----------
assignee:  -> terry.reedy
stage: needs patch -> patch review
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21140>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to