Thank you, very much!

-----Mensagem original-----
De: Borys Jurgiel [mailto:li...@borysjurgiel.pl] 
Enviada em: quarta-feira, 25 de julho de 2018 18:29
Para: qgis-developer@lists.osgeo.org
Cc: Jorge Almerio
Assunto: Re: [QGIS-Developer] QgsPluginManagerInterface

Hi,

QgsPluginManagerInterface is quite limited. Try this instead:

from qgis.utils import pluginMetadata
pluginMetadata('myPluginName', 'version')

For more info see https://github.com/qgis/QGIS/blob/master/python/utils.py#L290

Regards,
Borys


Dnia środa, 25 lipca 2018 18:30:26 CEST Jorge Almerio pisze:
> Hi devs,
> 
> 
> 
> I need to get the current version (in metadata.txt) of my plugin from
> python. I saw that there is a Class
> <https://qgis.org/pyqgis/master/gui/other/QgsPluginManagerInterface.html>
> to access Metadata, but I did not found any example how to use it.
> 
> I tried with the code below without success. Does anyone can help me?
> 
> 
> 
> from qgis.gui import QgsPluginManagerInterface
> 
> meta = QgsPluginManagerInterface.pluginMetadata('myPluginName')
> 
> print(meta)
> 
> 
> 
> Thanks is advance!





_______________________________________________
QGIS-Developer mailing list
QGIS-Developer@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to