[Qgis-developer] Processing scripts in stand-alone Python scripts

Anita Graser anitagraser at gmx.at
Thu Nov 26 05:55:54 PST 2015


On Thu, Nov 26, 2015 at 2:44 PM, Anita Graser <anitagraser at gmx.at> wrote:

> HI Victor,
>
> On Thu, Nov 26, 2015 at 1:12 PM, Victor Olaya <volayaf at gmail.com> wrote:
>
>> does Processing.getAlgorithm("script:helloworld") work in a normal
>> QGIS Python console?
>>
>
> ​Yes it does​.
>
> Just in case, the name of the script is the name of the file (without
>> the extension)
>>
>> Maybe you can try
>> ​​
>> Processing.alghelp("script") to get the name of
>> available algorithms from the script provider
>>
>
> ​Is alghelp() really correct? Even in the Python console, I only get errors
>
> processing.alghelp("scripts")
> Algorithm not found
> Processing.alghelp("script")
> Traceback (most recent call last):
>   File "<input>", line 1, in <module>
> AttributeError: class Processing has no attribute 'alghelp'​
>
>


​FYI

scripts = Processing.getProviderFromName('scripts')
print scripts.algs​

returns an empty list if run in the stand-alone script

Best wishes,
Anita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151126/086da92a/attachment-0001.html>


More information about the Qgis-developer mailing list