Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #51564
| 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 | 2013-07-30 15:47 +0100 |
| Subject | Re: timing issue: shutil.rmtree and os.makedirs |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5313.1375195670.3114.python-list@python.org> (permalink) |
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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