Message278141
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. |
|
Date |
User |
Action |
Args |
2016-10-05 17:25:59 | paul.moore | set | recipients:
+ paul.moore, tim.golden, steven.daprano, zach.ware, steve.dower, radialbeast |
2016-10-05 17:25:59 | paul.moore | set | messageid: <1475688359.34.0.628453055682.issue28365@psf.upfronthosting.co.za> |
2016-10-05 17:25:59 | paul.moore | link | issue28365 messages |
2016-10-05 17:25:59 | paul.moore | create | |
|