[Qgis-developer] QgsVectorLayer: how does it work?

luca_manganelli at comune.trento.it luca_manganelli at comune.trento.it
Thu Apr 2 08:03:53 EDT 2009


Hi, I'm trying to add a simple vector layer, but with no success.

I use this python code:

       layer = QgsVectorLayer("D:\temp\circoscr.shp", "circoscr", "ogr")

Here are the temp contents:

29/06/2007  07.56             1.538 circoscr.dbf
29/06/2007  07.56            36.452 circoscr.shp
29/06/2007  07.56               196 circoscr.shx

I can open it in QGIS.

But If I execute that python command, it gives me an error:

Failed to load

why?



More information about the Qgis-developer mailing list