

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

dataset/ETHPy150Open akheron/stango/stango/autoreload.py restart_with_reloader/original