<p dir="ltr">The method suggested by Salvatore is a shortcut to a set of imports required to run the Sextante methods. <br>
You would obtain the same, only for alglist(), correcting your import to</p>
<p dir="ltr"># from sextante.core.Sextante import alglist</p>
<p dir="ltr">because the method is in the Sextante module, but is not a Sextante class method. </p>
<p dir="ltr">Anyway, doing as Salvatore suggests, you obtain directly all what you need ;-) </p>
<p dir="ltr">giovanni </p>
<p dir="ltr">Sent from Nexus</p>
<div class="gmail_quote">Il giorno 25/nov/2012 00:32, "S. Koukoulas (lists)" <<a href="mailto:sotkouklistes@gmail.com">sotkouklistes@gmail.com</a>> ha scritto:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am trying to run grass commands through the python console using<br>
sextante and following this example:<br>
<br>
example:<br>
#import sextante python bindings<br>
from sextante.core.Sextante import Sextante<br>
<br>
#search available modules -- all<br>
Sextante.alglist()<br>
<br>
<br>
but I am getting the following error at Sextante.alglist() ... any help?<br>
.....<br>
>>> Sextante.alglist()<br>
<br>
Traceback (most recent call last):<br>
<br>
File "<input>", line 1, in <module><br>
<br>
AttributeError: class Sextante has no attribute 'alglist'<br>
<br>
<br>
thanks,<br>
sotiris<br>
<br>
QGIS 1.8, Sextante 1.0.8<br>
OS: Linux 3.6.6-1.fc17.x86_64 x86_64<br>
System: Fedora release 17 (Beefy Miracle)<br>
KDE: 4.9.3<br>
<br>
<br>
<br>
On 08/10/2012 07:26 PM, richard burcher wrote:<br>
> Hi maning,<br>
><br>
> Take a look at Sextante plugin. Can call grass modules from python console<br>
> very easily.<br>
><br>
> example:<br>
> #import sextante python bindings<br>
> from sextante.core.Sextante import Sextante<br>
><br>
> #search avaible modules -- all<br>
> Sextante.alglist()<br>
> #search specific<br>
> Sextante.alglist("voronoi")<br>
> [output] v.voronoi - Creates a Voronoi diagram from an input vector map<br>
> containing points or centroids.--->grass:v.voronoi<br>
><br>
> #get help on alg inputs<br>
> Sextante.alghelp("grass:v.voronoi")<br>
> [output] ALGORITHM: v.voronoi - Creates a Voronoi diagram from an input<br>
> vector map containing points or centroids.<br>
> input <ParameterVector><br>
> -l <ParameterBoolean><br>
> -t <ParameterBoolean><br>
> GRASS_REGION_PARAMETER <ParameterExtent><br>
> GRASS_REGION_CELLSIZE_PARAMETER <ParameterNumber><br>
> output <OutputVector><br>
><br>
> #run algorithm<br>
> Sextante.runalg("grass:v.voronoi",[follow from Sextante.alghelp output])<br>
><br>
> Use the svn update of Sextante. Checkout my blog post on setting up svn for<br>
> this<br>
> <a href="http://geotechrichard.com/2012/06/08/how-to-keep-pace-with-qgis-sextante-svn-of-course/" target="_blank">http://geotechrichard.com/2012/06/08/how-to-keep-pace-with-qgis-sextante-svn-of-course/</a><br>
><br>
> Cheers,<br>
><br>
> Richard<br>
><br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://osgeo-org.1560.n6.nabble.com/call-grass-modules-via-qgis-python-console-tp4994410p4994471.html" target="_blank">http://osgeo-org.1560.n6.nabble.com/call-grass-modules-via-qgis-python-console-tp4994410p4994471.html</a><br>
> Sent from the Quantum GIS - User mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> Qgis-user mailing list<br>
> <a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
</blockquote></div>