code: def main():
      
      from spyder.utils.qthelpers import qapplication
      app = qapplication()
      if os.name == 'nt':
          dialog = WinUserEnvDialog()
      else:
          dialog = EnvDialog()
      dialog.show()
      app.exec_()
docs: Run Windows environment variable editor