Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20459

Re: atexit.register in case of errors

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <miki.tebeka@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'skip': 0.04; 'to:addr:comp.lang.python': 0.09; 'from:addr:miki.tebeka': 0.16; 'from:name:miki tebeka': 0.16; 'subject:case': 0.16; 'cc:addr :python-list': 0.16; 'cc:no real name:2**0': 0.21; 'header:In- Reply-To:1': 0.22; 'received:209.85.220': 0.25; 'cc:2**0': 0.26; '(see': 0.28; 'subject:skip:a 10': 0.29; 'cc:addr:python.org': 0.29; 'error': 0.30; 'url:library': 0.31; 'header:User-Agent:1': 0.33; 'flag': 0.34; 'set.': 0.34; 'url:python': 0.35; 'received:google.com': 0.37; 'another': 0.37; 'received:209.85': 0.38; 'url:org': 0.39; 'option': 0.39; 'received:209': 0.39; 'goodbye': 0.73
Newsgroups comp.lang.python
Date Wed, 15 Feb 2012 10:40:00 -0800 (PST)
In-Reply-To <mailman.5827.1329311531.27778.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=75.82.8.111; posting-account=uo-8fwoAAACKsFzFX78JHudx1V7WDXZ0
References <mailman.5827.1329311531.27778.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
MIME-Version 1.0
Subject Re: atexit.register in case of errors
From Miki Tebeka <miki.tebeka@gmail.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
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>
Message-ID <mailman.5842.1329331202.27778.python-list@python.org> (permalink)
Lines 3
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1329331202 news.xs4all.nl 6918 [2001:888:2000:d::a6]:34231
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20459

Show key headers only | View raw


Another option is to use a global error flag and set it in sys.excepthook (see http://docs.python.org/library/sys.html#sys.excepthook).

goodbye will check the error flag and skip execution if error flag is set.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 13:12 +0000
  Re: atexit.register in case of errors Mel Wilson <mwilson@the-wire.com> - 2012-02-15 08:33 -0500
    Re: atexit.register in case of errors Devin Jeanpierre <jeanpierreda@gmail.com> - 2012-02-15 08:52 -0500
      Re: atexit.register in case of errors Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-02-15 16:18 +0100
        Re: atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 15:41 +0000
    Re: atexit.register in case of errors Andrea Crotti <andrea.crotti.0@gmail.com> - 2012-02-15 14:35 +0000
  Re: atexit.register in case of errors Miki Tebeka <miki.tebeka@gmail.com> - 2012-02-15 10:40 -0800
  Re: atexit.register in case of errors Miki Tebeka <miki.tebeka@gmail.com> - 2012-02-15 10:40 -0800

csiph-web