Hi!

It took me a (looong) while to call an external script from a QGIS plugin on my 
Windows machine at work. I'm not sure if this was a problem with the two Python 
interpreters - from QGIS and from ArcGIS or what so ever... It worked with no 
issues on my linux machine.

The only way I managed to run my external script (it imports ogr, osr, and 
shapefile) is to dynamically create and run a cmd-batch script according to 
OSGeo4W.bat which I used as blueprint:

Content of my batch file:
@echo off
call "C:\pathTo\QGIS Brighton 2.6.1-1\bin\o4w_env.bat"
@echo on
cmd /c python "C:\pathToMy\externalScript.py" -i "C:\pathToMy\inputFile.dat" -o 
"C:\pathToMy\outputFile.shp"
exit

Is there an easier way to do it? Background of having the "core functionallity" 
in an external script is to make it usable also from command line or (if 
possible) from ArcGIS.

Thank you, Torsten
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to