code: def do_reload(self, msg):
          
          #: TODO: This should use the autorelaoder
          app = self.app
  
          #: Show loading screen
          try:
              self.app.widget.showLoading("Reloading... Please wait.", now=True)
              #self.app.widget.restartPython(now=True)
              #sys.exit(0)
          except:
              #: TODO: Implement for iOS...
              pass
          self.save_changed_files(msg)
  
          if app.load_view is None:
              print("Warning: Reloading the view is not implemented. "
                    "Please set `app.load_view` to support this.")
              return
          if app.view is not None:
              try:
                  app.view.destroy()
              except:
                  pass
  
          def wrapped(f):
              def safe_reload(*args, **kwargs):
                  try:
                      return f(*args, **kwargs)
                  except:
                      #: Display the error
                      app.send_event(Command.ERROR, traceback.format_exc())
              return safe_reload
  
          app.deferred_call(wrapped(app.load_view), app)
docs: Called when the dev server wants to reload the view.