Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; "'python": 0.07; 'subject:skip:c 10': 0.07; 'subject:How': 0.09; 'corresponds': 0.09; 'instance.': 0.09; 'ping': 0.09; 'subject:set': 0.09; 'subject:using': 0.09; 'suggest': 0.11; 'aug': 0.13; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'least.': 0.16; 'subject:type': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'else,': 0.17; 'windows': 0.19; 'trying': 0.21; "i've": 0.23; 'header:In-Reply-To:1': 0.25; '(which': 0.26; 'message- id:@mail.gmail.com': 0.27; 'received:209.85.213.174': 0.29; 'received:mail-yx0-f174.google.com': 0.29; 'though.': 0.29; 'definition': 0.29; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'done': 0.34; 'doing': 0.35; 'pm,': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'does': 0.37; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'google': 0.39; 'header:Received:5': 0.40; "you'll": 0.62; '20,': 0.65; 'them;': 0.84; 'thing,': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=78YGJunj1i+5+n/6socZhaPgMSuFPVE/6468bhRLGxI=; b=H/UnNMDe5u1YWCRevpRucXTgYT0+kQ7dzlFbyzsZX5dw4r+ajqbYcXqdFyoSCLEBda MravHLLVaoNxaH3c/BT3WQEZ+qfogHk0eJRHYdE8BcwttgYRRvxZb+xWzyqUVbR1EtEL U8EoeR+A6BrnjLbbj1eL5Gp1PbYvV1ReYGPFfJPQMEZQ7y/HCEPpbPrdi2nhsAuokuXy Wzm78Maq1OOhcgobUDJytLd4zfR3rMgN4LnvwbcnrxtXetpqOWt/m2/va1rIno83IJXW ZZ7rSNOwteepDsZzS1ll5Evy+ecYLo2U675wfLX1Vicp8sgxTpS3i3OeUWXCqqT6E6rb Tx3g== MIME-Version: 1.0 In-Reply-To: <50323dc7$0$6841$e4fe514c@news2.news.xs4all.nl> References: <4edc5ccb-9121-47b0-8ad4-2bf106735532@googlegroups.com> <50323dc7$0$6841$e4fe514c@news2.news.xs4all.nl> Date: Tue, 21 Aug 2012 01:38:03 +1000 Subject: Re: How to set the socket type and the protocol of a socket using create_connection? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345477085 news.xs4all.nl 6936 [2001:888:2000:d::a6]:38917 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27502 On Mon, Aug 20, 2012 at 11:38 PM, Hans Mulder wrote: > Why are you trying to reimplement ping? > > All OS'es I am aware of come with a working ping implementation. For some definition of "working", at least. I've never managed to get MS Windows to ping broadcast, for instance. A Google search for 'python ping' comes up with a few good answers, though. You may want to have a look at some of them; if nothing else, you'll get confirmation that what you're doing corresponds to what someone else has done (which isn't proof you're doing the right thing, but it does suggest it). ChrisA