I am writing a plugin for QGIS 2.0, and I want to use the processing framework to call some functions.
When I open the Python Console inside QGIS, I am able to call it like this:
>>> import processing
And then, for instance:
>>> processing.alglist()
However, if I try to import it in my Python Plugin, it fails to find the processing include:
from qgis.core import *
from qgis.gui import *
import processing
I googled the problem and found these directives:
from processing.core.Processing import Processing
from processing.core.ProcessingConfig import Setting, ProcessingConfig
Unfortunately, it also does not work for me.
Does anybody know how to include the QGIS processing framework in a plugin, and how to call the algorithm (let us say for instance processing.runalg(...)?
I found many explanations on how to do it in the Python Console, but not outside QGIS.