Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.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.051 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:text': 0.05; 'subject:file': 0.07; 'sep': 0.09; 'subject:using': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'situation.': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'code.': 0.20; 'received:209.85.214.174': 0.21; 'header:In-Reply-To:1': 0.25; 'forgive': 0.27; 'message-id:@mail.gmail.com': 0.27; 'dan': 0.29; 'loop,': 0.29; 'code': 0.31; 'gets': 0.32; 'goes': 0.33; 'to:addr :python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'header:Received:5': 0.40; 'your': 0.60; "you've": 0.61; "you'll": 0.62; 'back': 0.62; 'soon': 0.70; 'bulk': 0.78; 'subject:get': 0.81; 'surround': 0.84; 'top.': 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=9Nuo4c2MHwcfsClt4Wzm0llTs8lk97HJaOtIKEN+faY=; b=I9xG4yrySQTd93o8pScrj307FfhjbAIz7vq6YE5G8eGXSIYBjhr6MUIbKfp/33s9IC 4StzSOsIUehFHUVWdiREOptdlosRbAEK2ieWi2J8ZRZ++2+sP1mMK3uCGW238W3XAK4e /DsEmeD8yROXrVYJXwdzI/pkXDkZsiDxT+TTTg4/ymxvDGOGV12Y4lksxLwMwhODfMcW azt+QeLy8NO10EbgIoqmAF+e6PTt8WcFDquYDTDoCdBwBHUywHrr7rFiYDgi68la+KAv efELlhTRPl5PN9IfBqyTjXXsR5Xh5BqOa+NNi6H/3cWqEmIaBEpZwf1qh2ipeg1SJLzu BTWw== MIME-Version: 1.0 In-Reply-To: References: <3359a0e7-f7bb-4b1f-b586-e83f337566b7@googlegroups.com> Date: Wed, 19 Sep 2012 18:59:20 +1000 Subject: Re: using text file to get ip address from hostname 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.15 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348045163 news.xs4all.nl 6929 [2001:888:2000:d::a6]:41452 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29473 On Wed, Sep 19, 2012 at 6:50 PM, Dan Katorza wrote: > i know about the while loop , but forgive me i just don't have a clue how to use it for this situation. You've already used one. What you need to do is surround your entire code with the loop, so that as soon as it gets to the bottom, it goes back to the top. Tip: You'll be indenting the bulk of your code. ChrisA