def restart_with_reloader():
 while 1:
  _log('info', ' * Restarting with reloader')
  args = ([sys.executable] + sys.argv)
  new_environ = os.environ.copy()
  new_environ['WERKZEUG_RUN_MAIN'] = 'true'
  if (os.name == 'nt'):
   for (key, value) in new_environ.iteritems():
    if isinstance(value, unicode):
     new_environ[key] = value.encode('iso-8859-1')
  exit_code = subprocess.call(args, env=new_environ)
  if (exit_code != 3):
   return exit_code

def restart_with_reloader ( ) : while 1 : _log ( 'info' , ' * Restarting with reloader' ) args = ( [ sys . executable ] + sys . argv ) new_environ = os . environ . copy ( ) new_environ [ 'WERKZEUG_RUN_MAIN' ] = 'true' if ( os . name == 'nt' ) : for ( key , value ) in new_environ . iteritems ( ) : if isinstance ( value , unicode ) : new_environ [ key ] = value . encode ( 'iso-8859-1' ) exit_code = subprocess . call ( args , env = new_environ ) if ( exit_code != 3 ) : return exit_code
spawn a new python interpreter with the same arguments as this one .