msg78010 - (view) |
Author: Brandon Dixon (brandon.dixon) |
Date: 2008-12-18 02:37 |
I made changes to my code and hit F5 to run it through IDLE. The code appeared to run without any errors, but when I closed everything out and ran it again it turned out to be full of errors. I am able to replicate this problem with my code and have seen others have the same problem, but its unclear when and what causes the caching to take place. I created a test file that only contained "print hello". I ran this, made changes and then ran it again. The changes were reflected, but after testing my code, it still cached. Attached is a simple python file I used to test everything out. Run the test, then comment out the Struct class and run it again. No errors should appear, but if you close the code, reopen it and then run it again it will error. |
|
|
msg78020 - (view) |
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *  |
Date: 2008-12-18 10:34 |
You are using IDLE with the "-n" option, so the same interpreter session is reused each time you hit F5. The second run works because the Struct from the first run is still present - but disappears of course when you restart IDLE. It's not really caching, but normal manipulation of variables, just like "a = 5" followed by "print a" works because 'a' is saved in-between. I suggest to remove this "-n" option, a fresh interpreter is started each time you press F5, and errors appear sooner... |
|
|
msg78078 - (view) |
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *  |
Date: 2008-12-19 23:58 |
Reopening: the user did not choose the "-n" option; this option is always set when using "edit with IDLE" Windows shell command. |
|
|
msg78079 - (view) |
Author: Brandon Dixon (brandon.dixon) |
Date: 2008-12-20 00:02 |
I tested this issue in Linux using the IDLE package (packed separately) from Python. I was not able to reproduce this error, so it appears to be with the Windows version of Python. |
|
|
msg91215 - (view) |
Author: Guilherme Polo (gpolo) *  |
Date: 2009-08-03 03:27 |
Amaury, from what I remember your suggestion has been applied some time ago. Can you check if the newest Windows installer still adds an '-n' by default ? |
|
|
msg91216 - (view) |
Author: Brandon Dixon (brandon.dixon) |
Date: 2009-08-03 05:53 |
Can you guys let me know when this is fixed or thought to be fixed. I would like to test from my end just to ensure. On Sun, Aug 2, 2009 at 11:27 PM, Guilherme Polo <report@bugs.python.org>wrote: > > Guilherme Polo <ggpolo@gmail.com> added the comment: > > Amaury, from what I remember your suggestion has been applied some time > ago. Can you check if the newest Windows installer still adds an '-n' by > default ? > > ---------- > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue4691> > _______________________________________ > |
|
|
msg91264 - (view) |
Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) *  |
Date: 2009-08-04 18:48 |
Yes, the -n switch was removed from the Windows installer with r72335 () |
|
|
msg149067 - (view) |
Author: Roger Serwy (roger.serwy) *  |
Date: 2011-12-09 00:59 |
Given Amaury's last message, should this issue be closed as being resolved? |
|
|