[Qgis-user] Python scripting

Alex Mandel tech_dev at wildintellect.com
Thu Apr 2 12:32:19 PDT 2009


georgew wrote:
> Hi all, I have not been able to find an answer to this question: Using the latest stable version of QGIS from OSGeo4W on WinXP SP3 is it possible to write free standing Python programs/scripts that will access QGIS objects (vectors, shapefiles, etc) and process them in batch, without the need for GUI or user intervention other than to run the script from Python command line (or within an IDE)?

It should be possible, I believe OSGeo4w installs it's own python and
hence all python libraries would be on it's path not on your system
installed python.

To use the libraries with your regular python install you probably need
to and to the PYTHONPATH environment variable of your system the path to
  something like C:\OSGEO4W\QGIS\

Then import qgis.core and such should work.

Alex



More information about the Qgis-user mailing list