2

When I run the following script in QGIS 2.6.1, it produces a folder called 'processing', which contains a log, in the directory it reads files from. And since the script reads files from several locations, there's going to be 'processing' folders scattered around.

Is there a way to disable this?

I've excluded the processes in the script as I believe this is the cause:

from processing.ProcessingPlugin import ProcessingPlugin
plugin = ProcessingPlugin(iface)
from processing.tools import *

Here is the script:

import os, sys, glob

from qgis.core import *
from qgis.gui import QgsMapCanvas
from PyQt4.QtGui import *

from os.path import expanduser
home = expanduser("~")

QgsApplication( [], False, home + "\AppData\Local\Temp" ) # Set a custom config path

QgsApplication.setPrefixPath("C:\\OSGeo4W64\\apps\\qgis", True)
QgsApplication.initQgis()
app = QApplication([])

#Run processes
def run():
...

1 Answer 1

2

You can redirect generated folder/files to a temporal directory of your operating system, so that they don't bother you anymore.

For instance, in GNU/Linux I can use /tmp to store all those logs and directories.

You would need to change a part of your script (where you create QApplication and set QgsApplication properties), like this:

QgsApplication( [], False, "/tmp" ) # Set a custom config path
QgsApplication.setPrefixPath( "/usr", True )
QgsApplication.initQgis()

app = QApplication( [] )
1
  • Huh interesting...will give that a go and report back.
    – Joseph
    Jan 20, 2015 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.