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. -- Steven -- http://mail.python.org/mailman/listinfo/python-list