Wait For Application Start

Francesco Guerrieri f.guerrieri at gmail.com
Tue Sep 18 08:40:57 EDT 2007


On 9/18/07, Robert Rawlins - Think Blue
<robert.rawlins at thinkbluemedia.co.uk> 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)

francesco



More information about the Python-list mailing list