Wait For Application Start

Francesco Guerrieri f.guerrieri at gmail.com
Tue Sep 18 21:38:20 CEST 2007


On 9/18/07, Michael Bentley <michael at jedimindworks.com> wrote:

> >
> > 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)

I thought of that, but I found more readable the positive form :-)

francesco



More information about the Python-list mailing list