[Idle-dev] Fwd: atexit handler in IDLE?

Steve Spicklemire steve at spvi.com
Fri Jan 18 13:06:34 CET 2013


That would be awesome if it could be done.

At the moment my patch is working for me in 2.7.3 (which is all I need for the moment).

I have to say... the deeper implications of one approach or another on IDLE as a whole are pretty much lost on me. ;-(

It would be nice if this behavior could be incorporated into IDLE at some point, since I can't be sure my students will always be using (or have access to) my patched version.

thanks,
-steve

On Jan 18, 2013, at 4:59 AM, Terry Reedy wrote:

> On 1/17/2013 4:44 PM, Steve Spicklemire wrote:
>> 
>> On Jan 17, 2013, at 8:22 AM, Terry Reedy <tjreedy at udel.edu> wrote:
>> 
>>> If a file, such Steve's, is run like so, from the command line with -i, does atexit processing automatically happen before switching to interactive mode, or not? Perhaps one of you can test.
>> 
>> It appears to happen after you exit from interactive mode, at least on python 2.6,2.7,3.2 and 3.3.
>> 
>> I'll have to wait to get to a computer to absorb the rest. I can't read all that on my phone!
> 
> This suggests to me that IDLE should run atexit stuff in the user process before is exits and before it RESTARTs. In the latter case, any atexit output will appear in the shell before the RESTART line.
> 
> -- 
> Terry Jan Reedy
> 
> _______________________________________________
> IDLE-dev mailing list
> IDLE-dev at python.org
> http://mail.python.org/mailman/listinfo/idle-dev



More information about the IDLE-dev mailing list