[Qgis-developer] QGis & Python

Pierre Cauhopé pierre.cauhope at free.fr
Sun Nov 29 16:34:38 EST 2009


Hi,

I'm trying to make a standalone app. As you said, I'm trying to load
qgis.core and qgis.gui out of Qgis.

When I try your solution, It change nothing...

# Import main libs
> import os
> from PyQt4        import QtCore, QtGui
> import sys
> sys.path.append("C:/qgis/python")
> from qgis.core    import *
> from qgis.gui     import *
>

I have :

Traceback (most recent call last):
>   File "C:\Users\Pierre\Desktop\Projet SIG\MontBlanc\qgismt\__main__.py",
> line 6, in <module>
>     from qgis.core    import *
> ImportError: DLL load failed: Le module spécifié est introuvable.
>

In C:\qgis\python I have a folder "qgis" with : core.pyd & gui.pyd ... I
don't understand why he don't want to load the module.

Thank you for your help.


2009/11/29 Luca Mandolesi <mandoluca at gmail.com>

> Are you developping a standalone app or it's a plugin. It seems that you
> try to load qgis.core out of Qgis. If you wanna call core and gui in a
> standalone app you must declare the path to the module throug a
> sys.path.append(your_path)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20091129/82a9fa02/attachment-0001.html


More information about the Qgis-developer mailing list