Paul Moore added the comment:

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.

----------

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

Reply via email to