Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!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.103 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.80; '*S*': 0.00; 'allowed.': 0.07; 'badly': 0.09; 'exception,': 0.09; 'wrote:': 0.18; 'app': 0.19; '>>>': 0.22; 'example': 0.22; 'header:User-Agent:1': 0.23; 'script.': 0.24; 'sends': 0.24; 'mon,': 0.24; 'skip:" 20': 0.27; 'header:In- Reply-To:1': 0.27; 'idea': 0.28; 'am,': 0.29; "d'aprano": 0.31; 'flying': 0.31; 'steven': 0.31; 'running': 0.33; 'something': 0.35; "didn't": 0.36; 'sometimes': 0.38; 'process,': 0.38; 'handle': 0.38; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'itself': 0.39; 'to:addr:python.org': 0.39; 'even': 0.60; 'dave': 0.60; 'charset:windows-1252': 0.65; 'sample': 0.67; 'received:74.208': 0.68; '2015': 0.84; 'worthwhile.': 0.84; 'angel': 0.91 Date: Mon, 11 May 2015 09:21:38 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Feature Request: Reposition Execution References: <2d482$5550967d$5419aafe$27910@news.ziggo.nl> <5550a223$0$13013$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <5550a223$0$13013$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:OVD+hdUbEh60vQv0sto1kPJmXEnglLCAEYWGXtlnD50l5VqVdxo 3xwcyy9L9actavwd77bMWo0TikazABPvmh9Ulj07Qw2ejf6sxEPJjOZ8Wuzv2SzmMfvoWrL i1zeR7D8U2wdMg+TiATIvY2ylDoOMRSRUQmdvAcvPR096Z6cXTBvZ3EqEsR2RDVWSF9h79+ d4MV6Y2jIor2/cv5aNmXA== X-UI-Out-Filterresults: notjunk:1; X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431350512 news.xs4all.nl 2846 [2001:888:2000:d::a6]:37717 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90376 On 05/11/2015 08:35 AM, Steven D'Aprano wrote: > On Mon, 11 May 2015 09:57 pm, Dave Angel wrote: > >> On 05/11/2015 07:46 AM, Skybuck Flying wrote: >>> Hello, >>> >>> Sometimes it can be handy to "interrupt/reset/reposition" a running >>> script. >>> >>> For example something externally goes badly wrong. >>> >> >> os.kill() >> >> then in your process, handle the exception, and do whatever you think is >> worthwhile. > > > Are you suggesting that the app sends itself a signal? > > Is that even allowed? > No idea if it's allowed. I didn't notice his sample was multithreaded, as i grabbed on the "externally goes badly wrong". -- DaveA