On Sep 18, 2007, at 5:40 AM, Francesco Guerrieri wrote:

> On 9/18/07, Robert Rawlins - Think Blue
> <[EMAIL PROTECTED]> wrote:
>> This seems like a very logical method, but I'm not sure how to  
>> implement it
>> into my python code? Is there a simple way to make it wait for  
>> that file?
>> Without the need to build my own conditional loop?
>
> I'm not sure why how you could avoid a conditional loop. Could
> something like this work?
>
> import os.path
> import time
>
> while True:
>     if os.path.exists(YOUR_FILE):
>         break
>     time.sleep(30)

or

while not os.path.exists(YOUR_FILE):
     time.sleep(1)



-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to