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


Groups > comp.lang.python > #97315

Re: ConnectionError handling problem

Path csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <cameron@cskk.homeip.net>
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; 'returned.': 0.07; 'creighton': 0.09; 'errno': 0.09; 'loop.': 0.09; 'python': 0.10; 'causing': 0.13; 'do,': 0.15; 'thu,': 0.15; '>in': 0.16; 'control-c': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message- id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'simpson': 0.16; 'subject:handling': 0.16; 'wrote:': 0.16; 'laura': 0.18; '2015': 0.20; 'resumes': 0.22; 'subject:problem': 0.22; 'cheers,': 0.22; 'code,': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; 'shoot': 0.29; 'probably': 0.31; 'post': 0.31; 'continuing': 0.32; 'problem': 0.33; 'received:com.au': 0.33; 'c++': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'whatever': 0.39; 'to:addr:python.org': 0.40; 'easy': 0.60; 'your': 0.60; 'cameron': 0.66; 'yourself': 0.73; '+1000,': 0.84
Date Fri, 2 Oct 2015 08:52:36 +1000
From Cameron Simpson <cs@zip.com.au>
To python-list@python.org
Subject Re: ConnectionError handling problem
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii; format=flowed
Content-Disposition inline
In-Reply-To <201509302156.t8ULu2rE000710@fido.openend.se>
User-Agent Mutt/1.5.23 (2014-03-12)
References <201509302156.t8ULu2rE000710@fido.openend.se>
X-Optus-CM-Score 0
X-Optus-CM-Analysis v=2.1 cv=H5kmuLsi c=1 sm=1 tr=0 a=t6IGaf1l19PsElHJfDn/BA==:117 a=t6IGaf1l19PsElHJfDn/BA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=vrnE16BAAAAA:8 a=kj9zAlcOel0A:10 a=5lJygRwiOn0A:10 a=nou8JfgPL0kBpD2H4j4A:9 a=CjuIK1q_8ugA:10
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.319.1443739969.28679.python-list@python.org> (permalink)
Lines 18
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1443739969 news.xs4all.nl 23833 [2001:888:2000:d::a6]:50601
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3647
X-Received-Body-CRC 682163685
Xref csiph.com comp.lang.python:97315

Show key headers only | View raw


On 30Sep2015 23:56, Laura Creighton <lac@openend.se> wrote:
>In a message of Thu, 01 Oct 2015 07:30:59 +1000, Cameron Simpson writes:
>>Most likely the Ctrl-C interrupts whatever system call is hanging, causing it
>>to return (failed, probably with errno EINTR). And the python program resumes
>>because the OS system call has returned.
>
>Shiva Upreti needs to post the current code, but last time I read it
>the problem was that control-C is a KeyboardInterrupt, which the
>program was catching, and then continuing the loop.

Indeed.

Cheers,
Cameron Simpson <cs@zip.com.au>

C makes it easy for you to shoot yourself in the foot.  C++ makes that
harder, but when you do, it blows away your whole leg.
- Bjarne Stroustrup

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


Thread

Re: ConnectionError handling problem Cameron Simpson <cs@zip.com.au> - 2015-10-02 08:52 +1000

csiph-web