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 paul.moore, r.david.murray, radialbeast, steve.dower, steven.daprano, terry.reedy, tim.golden, zach.ware
Date 2016-10-06.20:24:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475785496.26.0.488180215351.issue28365@psf.upfronthosting.co.za>
In-reply-to
Content
I am closing this as a duplicate of existing #21140, to make .txt instead of .py the extension for files known not to be code files.  I There is an existing simple patch.  I will modify it to not even offer .py as a secondary choice.

The reason Paul had to close IDLE to open the file in an(other) editor window is that Python allows only one editor window per file, and Shell is a subclass of OutputWindow, which is a subclass of EditorWindow. (The latter inheritance is backwards; OutputWindow should be the base TextEditor and 'CodeEditor' a subclass thereof.) When Shell is saved, the file name appears on the recent files list, and attempts to open it make the exiting editor the active window. 

Angie, as Paul explained, your screenshot shows a text file, mislabeled as a .py python file, in the editor.  When you run non-code text as code, you get a SyntaxError.  The text file appears to be a saved interactive shell session.  "Python 3" by itself is a SyntaxError and will continue to be an error no matter what follows.

It is possible that your Python installation, or the IDLE part of it, is badly broken, and needs to be repaired or re-installed.  But I think it much much  more likely that you have made a mistake.  If you want to discuss this further, please post to python-list (or its news.gmane.org mirror).  Include a link to this issue, give a detailed description of what you did (keystrokes and mouse clicks), and ask any questions.
History
Date User Action Args
2016-10-06 20:24:56terry.reedysetrecipients: + terry.reedy, paul.moore, tim.golden, steven.daprano, r.david.murray, zach.ware, steve.dower, radialbeast
2016-10-06 20:24:56terry.reedysetmessageid: <1475785496.26.0.488180215351.issue28365@psf.upfronthosting.co.za>
2016-10-06 20:24:56terry.reedylinkissue28365 messages
2016-10-06 20:24:55terry.reedycreate