code: def reload():
      
      try:
          # Reload and replace current process
          os.execv(sys.executable, [sys.executable] + sys.argv)
  
      except OSError:
          # Ugh, that failed
          # Try spawning a new process and exitj
          os.spawnv(os.P_NOWAIT, sys.executable, [sys.executable] + sys.argv)
          os._exit(os.EX_OK)
docs: Reload process