IDLE bug

Terry Reedy tjreedy at udel.edu
Wed Apr 20 07:26:23 CEST 2011


On 4/19/2011 11:39 PM, harrismh777 wrote:
> Terry Reedy wrote:
>> If one is new to Python and perhaps not sure, or should not be sure,
>> then I prefer that one ask here for a second opinion.
>
> Thanks Terry. I am not new to Python, but I am new to Python3, and I'm
> also relatively new to IDLE. Typically I edit with vi, test on the
> terminal, and run on the server. I have been using IDLE more these days,
> and also working more with Tk, so I've run into a couple little minor
> snags. Anyway, sorry, I'm digressing a bit...as usual.
>
> Here is the bug, for a second opinion:
>
> Under some circumstances, which I will detail later down the note, if I
> click File --> Close without explicitly saving, and without running the
> module with Run --> Run Module , then the last changes I made to the
> file do not get saved. The save dialogue pop-up does appear, and I do
> select YES--- I want to save before closing--- but when I re-open the
> file (IDLE or vi) the changes are not there... as though the save
> binding did not work, or like there was some timing glitch that
> prevented the save somehow before the edit window closed down. The error
> is not solid, in that, if the file is larger (significantly) then the
> File --> Close (select Yes on the dialogue) does work... ??
>
> The work around is to do either 1) run the module, or 2) explicitly
> click File --> Save.
>
> The alleged bug can be reproduced on both of my primary desk machines,
> Linux systems, using IDLE on 2.6, 2.7, and 3.2/ These are the
> instructions for reproducing this little snag:
>
> 1) Open a new edit window with File --> New Window
>
> 2) Enter the following code on the first two lines:
> def testfunc():
> return None
>
> 3) Click File --> Save ( testit.py )
>
> 4) Click File --> Close
>
> 5) Open the file with File --> Recent Files ( select testit.py )
>
> 6) Use the edit window to place these three lines above testfunc:
> ############################
> # comment block
> ##############################
>
> 7) Click File --> Close
>
> 8) When the Save on Close dialogue appears select "Yes"
>
> 9) Re-open the file with File --> Recent Files ( select testit.py )
>
> 10) The comment block will not be there... didn't save.

On my winxp, following the above *exactly*, the comment block is there. 
But I can believe there might be a system specific glitch around save 
and close. See
http://bugs.python.org/issue9803
http://bugs.python.org/issue10365

Go ahead and report, noting which Linux distribution, and include my 
negative report. Add me as nosy.

-- 
Terry Jan Reedy




More information about the Python-list mailing list