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 paul.moore
Recipients paul.moore, radialbeast, steve.dower, steven.daprano, tim.golden, zach.ware
Date 2016-10-05.17:25:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1475688359.34.0.628453055682.issue28365@psf.upfronthosting.co.za>
In-reply-to
Content
I can recreate this (based on the screenshots from #28366).

To reproduce, open IDLE. You get the console banner and prompt. Save that file using File-Save. The close IDLE. Reopen it, do File-Open to open your saved console session, then use the "Run" menu to run it. (You need to close IDLE, so it "forgets" the .py file came from a console session.)

That's incorrect usage, of course (not "of course" to the OP - that's the real point here) as the text of a console session isn't a valid Python file, and doesn't syntax check. The error is saying precisely that - what is in the file isn't valid Python.

So in one sense, this is simply user error. But I wonder, is there something about how IDLE presents things that could be improved? Either in the documentation or in the UI? I'm not exactly sure what the point of "file-save" in a console window is, and certainly it would be better to save the transcript as text so it couldn't be inadvertently be read back in as a Python module.

I'm not an IDLE user, though, so I don't really have the background to know the best solution.
History
Date User Action Args
2016-10-05 17:25:59paul.mooresetrecipients: + paul.moore, tim.golden, steven.daprano, zach.ware, steve.dower, radialbeast
2016-10-05 17:25:59paul.mooresetmessageid: <1475688359.34.0.628453055682.issue28365@psf.upfronthosting.co.za>
2016-10-05 17:25:59paul.moorelinkissue28365 messages
2016-10-05 17:25:59paul.moorecreate