Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36865
| 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 | <steve@spvi.com> |
| 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> <CAMjeLr9nndcSNcbtJq1psruMiLyUffKBhYdG2hOr1XZ1SvfPZA@mail.gmail.com> <CAMjeLr8OLAkKDmbkUNxDOY9QM7CAq_fcnFqdu3F8P2F29H0KQw@mail.gmail.com> |
| In-Reply-To | <CAMjeLr8OLAkKDmbkUNxDOY9QM7CAq_fcnFqdu3F8P2F29H0KQw@mail.gmail.com> |
| 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 <steve@spvi.com> |
| Subject | Re: atexit handler in IDLE? |
| Date | Tue, 15 Jan 2013 12:38:15 -0700 |
| To | Mark Janssen <dreamingforward@gmail.com> |
| Cc | Python List <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.549.1358278701.2939.python-list@python.org> (permalink) |
| 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 |
Show key headers only | View raw
On Jan 15, 2013, at 10:22 AM, Mark Janssen <dreamingforward@gmail.com> wrote: > On Tue, Jan 15, 2013 at 6:25 AM, Steve Spicklemire <steve@spvi.com> wrote: >> I'm trying to get this program, which works on the command line, to run correctly in the IDLE environment: >> >> import atexit >> >> print "This is my program" >> >> def exit_func(): >> print "OK.. that's all folks!" >> >> atexit.register(exit_func) >> >> print "Program is ending..." > > 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. > > mark > -- > 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? ============================= *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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: atexit handler in IDLE? Steve Spicklemire <steve@spvi.com> - 2013-01-15 12:38 -0700
csiph-web