Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:IDLE': 0.04; 'python': 0.09; 'default)': 0.09; 'cc:addr:python-list': 0.10; 'looked': 0.10; 'def': 0.10; '"this': 0.13; 'exercise': 0.13; 'steve': 0.13; '(the': 0.15; 'atexit': 0.16; 'cc:name:python list': 0.16; 'east,': 0.16; 'false),': 0.16; 'from:addr:steve': 0.16; 'idlefork': 0.16; 'janssen': 0.16; 'program"': 0.16; 'strange,': 0.16; 'subprocess': 0.16; 'wrote:': 0.17; 'jan': 0.18; 'tests': 0.18; 'trying': 0.21; 'bit': 0.21; 'import': 0.21; 'fairly': 0.21; '(by': 0.22; 'skip:= 20': 0.22; 'cc:2**0': 0.23; 'work.': 0.23; '15,': 0.23; '(this': 0.24; 'command': 0.24; 'tried': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; '----------': 0.26; 'setting': 0.26; 'thanks!': 0.26; 'am,': 0.27; 'options': 0.27; 'run': 0.28; 'once.': 0.29; 'running.': 0.29; 'date:': 0.29; 'url:mailman': 0.29; 'included': 0.29; 'this.': 0.29; "i'm": 0.29; 'knows': 0.30; 'implement': 0.32; 'url:python': 0.32; 'skip:- 10': 0.32; 'print': 0.32; 'url:listinfo': 0.32; 'idle': 0.33; 'problem': 0.33; 'program,': 0.34; 'list': 0.35; 'todo': 0.35; 'subject:?': 0.35; 'there': 0.35; 'list.': 0.35; 'really': 0.36; 'but': 0.36; 'url:org': 0.36; 'test': 0.36; 'charset:us-ascii': 0.36; 'correctly': 0.37; 'option': 0.37; 'item': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'received:10': 0.38; 'url:mail': 0.40; 'think': 0.40; 'header:Message-Id:1': 0.62; 'received:12': 0.81; '2013': 0.84 References: <24E53D14-FD57-4FE2-8763-99149773650B@spvi.com> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (10A523) From: Steve Spicklemire Subject: Re: atexit handler in IDLE? Date: Tue, 15 Jan 2013 12:38:15 -0700 To: Mark Janssen Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 51 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358278701 news.xs4all.nl 6855 [2001:888:2000:d::a6]:51181 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36865 On Jan 15, 2013, at 10:22 AM, Mark Janssen wrote= : > On Tue, Jan 15, 2013 at 6:25 AM, Steve Spicklemire wrote:= >> I'm trying to get this program, which works on the command line, to run c= orrectly in the IDLE environment: >>=20 >> import atexit >>=20 >> print "This is my program" >>=20 >> def exit_func(): >> print "OK.. that's all folks!" >>=20 >> atexit.register(exit_func) >>=20 >> print "Program is ending..." >=20 > You know, I think I looked at this problem once. It was rather > strange, but I think you need to create a tempfile, so that Python > knows that IDLE is running. There's an item for this in IDLE's TODO > list. I was going to implement it, which is fairly east, but never > got to it. >=20 > mark > --=20 > http://mail.python.org/mailman/listinfo/python-list I don't really know how to use this. Is there a detailed todo list somewhere= ? I did find this tantalizing bit in news.txt, but when I tried to test it (= by setting to option to false), I couldn't get it to work. Is there a set of= tests for idle that might exercise this option? ---------- What's New in IDLEfork 0.9b1? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D *Release date: 02-Jun-2003* - Added the delete-exitfunc option to config-main.def. (This option is not included in the Options dialog.) Setting this to True (the default) will cause IDLE to not run sys.exitfunc/atexit when the subprocess exits. ------------- Thanks! -steve=