Try this:

from qgis.core import QGis
print QGis.QGIS_VERSION

if QGis.QGIS_VERSION[0:3] <= "1.5":
...

Regards,

Germán

2011/1/5 Chris Crook <[email protected]>

> Hi All
>
> I'm looking for help on how to find the Qgis version that is running from
> Python, in order to put version conditional code into a plugin.
>
> I think that generally it is a better idea to test specific capabilities,
> but in this case I can't find a way to do that either :-(
>
> Thanks for any help
> Chris
>
> ______________________________________________________________________________________________________
>
> This message contains information, which is confidential and may be subject
> to legal privilege.
> If you are not the intended recipient, you must not peruse, use,
> disseminate, distribute or copy this message.
> If you have received this message in error, please notify us immediately
> (Phone 0800 665 463 or [email protected]) and destroy the original
> message.
> LINZ accepts no responsibility for changes to this email, or for any
> attachments, after its transmission from LINZ.
>
> Thank you.
>
> ______________________________________________________________________________________________________
> _______________________________________________
> Qgis-developer mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
-----------
  |\__
(:>__)(
  |/

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to