parameters: (packageName: str)
return_statement: return True
docstring: initialize the plugin
docstring_summary: initialize the plugin
docstring_tokens: initialize the plugin
function: def startPlugin(packageName: str) -> bool:
      """ initialize the plugin """
      global plugins, active_plugins, iface, plugin_times
      start = time.process_time()
      if not _startPlugin(packageName):
          return False
  
      # initGui
      try:
          plugins[packageName].initGui()
      except:
          del plugins[packageName]
          _unloadPluginModules(packageName)
          errMsg = QCoreApplication.translate("Python", "Couldn't load plugin '{0}'").format(packageName)
          msg = QCoreApplication.translate("Python", "{0} due to an error when calling its initGui() method").format(errMsg)
          showException(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2], msg, messagebar=True, level=Qgis.Critical)
          return False
  
      end = time.process_time()
      _addToActivePlugins(packageName, end - start)
      return True
function_tokens: def startPlugin ( packageName : str ) -> bool : global plugins , active_plugins , iface , plugin_times start = time . process_time ( ) if not _startPlugin ( packageName ) : return False # initGui try : plugins [ packageName ] . initGui ( ) except : del plugins [ packageName ] _unloadPluginModules ( packageName ) errMsg = QCoreApplication . translate ( "Python" , "Couldn't load plugin '{0}'" ) . format ( packageName ) msg = QCoreApplication . translate ( "Python" , "{0} due to an error when calling its initGui() method" ) . format ( errMsg ) showException ( sys . exc_info ( ) [ 0 ] , sys . exc_info ( ) [ 1 ] , sys . exc_info ( ) [ 2 ] , msg , messagebar = True , level = Qgis . Critical ) return False end = time . process_time ( ) _addToActivePlugins ( packageName , end - start ) return True