A related question. Is it possible for my module to detect that it's being run 
under IDLE? Are there any clues in the environment that I could count on to 
tell?

thanks!
-steve

On Jan 18, 2013, at 5:06 AM, Steve Spicklemire <[email protected]> wrote:

> 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 <[email protected]> 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
>> [email protected]
>> http://mail.python.org/mailman/listinfo/idle-dev
> 
_______________________________________________
IDLE-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/idle-dev

Reply via email to