New answers tagged

3

You could create a custom script in your model to clear the '/tmp' folder at the end of each run. There's numerous ways to delete files but I like to use shutil.rmtree which deletes all files/folders in a specified directory. To do this, go to Processing Toolbox > Scripts > Tools > Create new script and copy the following (adjust the path): import shutil ...


5

I use following intro for stand-alone applications: # the_app.py import os import sys from qgis.core import * from PyQt4.QtGui import * def main(): QgsApplication.setPrefixPath(os.environ['QGIS_PREFIX'], True) QgsApplication.initQgis() # app specific code ... QgsApplication.exitQgis() sys.exit(result) if __name__ == ...



Top 50 recent answers are included