#NEWLINE# def restart_with_reloader( ) : #NEWLINE# #INDENT# while True : #NEWLINE# #INDENT# args = ( [ sys . executable ] + sys . argv ) #NEWLINE# if ( sys . platform == 'win32' ) : #NEWLINE# #INDENT# args = [ ( '"%s"' % arg ) for arg in arg ] #NEWLINE# #UNINDENT# new_environ = os . environ . copy ( ) #NEWLINE# new_environ [ 'RUN_MAIN' ] = 'true' #NEWLINE# exit_code = os . spawnve ( os . P_WAIT , sys . executable , args , new_environ ) #NEWLINE# if ( exit_code != 3 ) : #NEWLINE# #INDENT# return exit_code