[Qgis-user] Python scripting

georgew gws293 at hotmail.com
Thu Apr 2 12:47:41 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
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


ThanKs Alex, the problem is I have not been able to find any example that is free standing, all seem to be plugins or use QT to generate a UI. Can you point me to a working example, however simple (e.g. read shapefile, project,write shapefile) that can set me off on the right path?
Many thanks
G.
-- 
View this message in context: http://n2.nabble.com/Python-scripting-tp2577010p2577236.html
Sent from the qgis-user mailing list archive at Nabble.com.




More information about the Qgis-user mailing list