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


Groups > comp.lang.python > #51564

Re: timing issue: shutil.rmtree and os.makedirs

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'argument': 0.05; 'subject:skip:s 10': 0.07; 'tune': 0.09; '(assuming': 0.16; '1.7': 0.16; 'docs.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'seconds,': 0.16; 'seconds.': 0.16; 'sleep(delay)': 0.16; 'subject:issue': 0.16; 'subject:timing': 0.16; 'wrote:': 0.18; 'skip:1 30': 0.19; 'hours,': 0.24; 'required.': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; "doesn't": 0.30; 'errors': 0.30; 'message-id:@mail.gmail.com': 0.30; '+0100,': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'checking': 0.33; 'received:google.com': 0.35; 'minimum': 0.38; 'skip:o 20': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'break': 0.61; 'maximum': 0.63; '30,': 0.65; 'minutes': 0.67; 'jul': 0.74; 'actually,': 0.84; '2013': 0.98
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=vVvzbs0kVV2W5MZqHD/RCuZvbRcTNA7D9jRm3TCJBcg=; b=VpViriybXVWoGwmlvqiMP7E7/v1B6ZFk3I0QmA6kQN705447rcyYP6/L7StWoC7Ns1 g+y6DS+bwSVhKJDH7M3ZOcujAgU5rjg8hGxaHuAmGrY5eKrZA3RCdT1LHK1eDm3S0/3V WYcK2hD4vAmyRDngKJBxg0L6vBoZAB5NKagCODc3XzT3asoTiqbUxRkqUIn8gbuZox7b eGq3T9aNZuhb9fh49ER0UpS1uwe5E05gQxhoR/WMJLxftQfEOrXXqT9AVdfEjPa+D+xP zh69vzaEZSvxZ4nHsPFrZrfRl26DtClFhhfDBWIJ3B3WbUuVVO0KNZVqKwczP3fKoTGG PAHw==
MIME-Version 1.0
X-Received by 10.220.182.193 with SMTP id cd1mr10306860vcb.32.1375195666649; Tue, 30 Jul 2013 07:47:46 -0700 (PDT)
In-Reply-To <51f7c89a$0$30000$c3e8da3$5496439d@news.astraweb.com>
References <fd605b09-ce7d-4c33-922d-57f423a09556@googlegroups.com> <mailman.5292.1375141959.3114.python-list@python.org> <ecb47a19-2763-4e2d-9e6e-1d9607b43cb0@googlegroups.com> <mailman.5306.1375190838.3114.python-list@python.org> <51f7c89a$0$30000$c3e8da3$5496439d@news.astraweb.com>
Date Tue, 30 Jul 2013 15:47:46 +0100
Subject Re: timing issue: shutil.rmtree and os.makedirs
From Chris Angelico <rosuav@gmail.com>
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 <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>
Newsgroups comp.lang.python
Message-ID <mailman.5313.1375195670.3114.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1375195670 news.xs4all.nl 15931 [2001:888:2000:d::a6]:55872
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51564

Show key headers only | View raw


On Tue, Jul 30, 2013 at 3:07 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> wrote:
> On Tue, 30 Jul 2013 14:27:10 +0100, Chris Angelico wrote:
>
>> for delay in 100,300,600,1000,3000,5000,10000:
>>   if not os.path.exists(directory): break
>>   sleep(delay)
>>
>> That'll sleep a maximum of 20 seconds, tune as required.
>
> Actually, that will sleep a maximum of 5.55 hours, and a minimum of 1.7
> minutes (assuming the directory doesn't get deleted instantaneously).
>
> time.sleep() takes an argument in seconds.

LOL! Whoops. That's what I get for not checking my docs. This is why
we have public responses, my errors can be caught by someone else.

ChrisA

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


Thread

timing issue: shutil.rmtree and os.makedirs Tim <jtim.arnold@gmail.com> - 2013-07-29 12:16 -0700
  Re: timing issue: shutil.rmtree and os.makedirs Chris Angelico <rosuav@gmail.com> - 2013-07-30 00:52 +0100
    Re: timing issue: shutil.rmtree and os.makedirs Tim <jtim.arnold@gmail.com> - 2013-07-30 06:10 -0700
      Re: timing issue: shutil.rmtree and os.makedirs Chris Angelico <rosuav@gmail.com> - 2013-07-30 14:27 +0100
        Re: timing issue: shutil.rmtree and os.makedirs Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-30 14:07 +0000
          Re: timing issue: shutil.rmtree and os.makedirs Chris Angelico <rosuav@gmail.com> - 2013-07-30 15:47 +0100
        Re: timing issue: shutil.rmtree and os.makedirs Tim <jtim.arnold@gmail.com> - 2013-07-30 08:37 -0700
          Re: timing issue: shutil.rmtree and os.makedirs Chris Angelico <rosuav@gmail.com> - 2013-07-30 17:03 +0100
      Re: timing issue: shutil.rmtree and os.makedirs Göktuğ Kayaalp <goktug.kayaalp@gmail.com> - 2013-07-30 20:09 +0300

csiph-web