def _reloader_observer(server, app, interval):
 (fd, lockfile) = tempfile.mkstemp(prefix='bottle-reloader.', suffix='.lock')
 os.close(fd)
 try:
  while os.path.exists(lockfile):
   args = ([sys.executable] + sys.argv)
   environ = os.environ.copy()
   environ['BOTTLE_CHILD'] = 'true'
   environ['BOTTLE_LOCKFILE'] = lockfile
   p = subprocess.Popen(args, env=environ)
   while (p.poll() is None):
    os.utime(lockfile, None)
    time.sleep(interval)
   if (p.poll() != 3):
    if os.path.exists(lockfile):
     os.unlink(lockfile)
    sys.exit(p.poll())
   elif (not server.quiet):
    print 'Reloading server...'
 except KeyboardInterrupt:
  pass
 if os.path.exists(lockfile):
  os.unlink(lockfile)

def _reloader_observer ( server , app , interval ) : ( fd , lockfile ) = tempfile . mkstemp ( prefix = 'bottle-reloader.' , suffix = '.lock' ) os . close ( fd ) try : while os . path . exists ( lockfile ) : args = ( [ sys . executable ] + sys . argv ) environ = os . environ . copy ( ) environ [ 'BOTTLE_CHILD' ] = 'true' environ [ 'BOTTLE_LOCKFILE' ] = lockfile p = subprocess . Popen ( args , env = environ ) while ( p . poll ( ) is None ) : os . utime ( lockfile , None ) time . sleep ( interval ) if ( p . poll ( ) != 3 ) : if os . path . exists ( lockfile ) : os . unlink ( lockfile ) sys . exit ( p . poll ( ) ) elif ( not server . quiet ) : print 'Reloading server...' except KeyboardInterrupt : pass if os . path . exists ( lockfile ) : os . unlink ( lockfile )
start a child process with identical commandline arguments and restart it as long as it exists with status code 3 .