[Qgis-developer] Quantum GIS from the standard python shell - unable to load layer

Martin Dobias wonder.sk at gmail.com
Mon May 10 07:29:35 EDT 2010


Hi "baobazz"

On Fri, May 7, 2010 at 5:47 PM, baobazz <baobazz at hotmail.fr> wrote:
>
> Hi,
>
> I'm trying to launch QGIS from the standard python shell.
> But I'm unable to load a test layer which is very simple, as consisting in
> only 2 polygons..
>
> Here is what I write in the standard python shell
>>>> from qgis.core import *
>>>> QgsApplication.setPrefixPath("C:/Program Files/Quantum GIS Enceladus")

You should add second parameter set to True, i.e.:
QgsApplication.setPrefixPath("C:/Program Files/Quantum GIS Enceladus", True)

Using this, all other paths used within QGIS will be set according to
the prefix.

Martin


More information about the Qgis-developer mailing list