Hi all<br><br>+1 for using QProcess. I am using it in Lizmap Plugin to run external librairies (winSCP on windows, lftp on linux), and it works great. You can easily connect signals like readyReadStandardOutput(), readyReadStandardError() and finished(int, QProcess::ExitStatus) to your plugin methods. <br>
<br>Michael<br><br><div class="gmail_quote">2012/5/13 Etienne Tourigny <span dir="ltr">&lt;<a href="mailto:etourigny.dev@gmail.com" target="_blank">etourigny.dev@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Victor,<br>
<br>
I agree on all your points.<br>
<br>
May I suggest to have a unique interface/approach that other existing<br>
interfaces can benefit from (i.e. standalone gdaltools and ftools).<br>
<br>
It seems that QProcess is an interesting candidate (and QThread when<br>
not using external app.), because it works in both c++ and in pyqt<br>
(ref. gdaltools) - plus there is already code inside qgis that uses<br>
it.<br>
<br>
my 2 centavos<br>
<span class="HOEnZb"><font color="#888888">Etienne<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sun, May 13, 2012 at 6:13 PM, Victor Olaya &lt;<a href="mailto:volayaf@gmail.com">volayaf@gmail.com</a>&gt; wrote:<br>
&gt; Here is my opinion on all that, in short:<br>
&gt;<br>
&gt; -The main idea of using threads is not now to execute multiplep<br>
&gt; algorithms at the same time, so we can remove a lot of complexity<br>
&gt; (like 2 processes writing the same file, as it was mentioned)<br>
&gt;<br>
&gt; -Implementing a canceling mechanism is going to be the greatest<br>
&gt; improvement once we have the threading stuff<br>
&gt;<br>
&gt; -So, for me, this is what should be done:<br>
&gt;<br>
&gt;  1)implementing the threading part<br>
&gt;  2) implement the cancelling mechanism (a responsive cancel button, etc)<br>
&gt;  3) modifying algorithm to respond to cancellin events.<br>
&gt;<br>
&gt; I think that would be more than enough for a first part, and it would<br>
&gt; be a great improvement for SEXTANTE<br>
&gt;<br>
&gt; Regards<br>
&gt;<br>
&gt; p.s. Just to let you know, I am leaving for Honduras tomorrow, and<br>
&gt; will be there working for 2 weeks, so I not might be very active on<br>
&gt; the lists during the next 15 days or so<br>
&gt;<br>
&gt; 2012/5/13 Marco Hugentobler &lt;<a href="mailto:marco.hugentobler@sourcepole.ch">marco.hugentobler@sourcepole.ch</a>&gt;:<br>
&gt;&gt; Hi Alex<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt;Also I think about rewritting fTools in C++ and integrating its<br>
&gt;&gt;&gt;algorithms into QGIS<br>
&gt;&gt;&gt;analysis library. This makes tools a bit faster and will allow to use<br>
&gt;&gt;&gt;algorithms in<br>
&gt;&gt;&gt;plugins<br>
&gt;&gt;<br>
&gt;&gt; That would be a great enhancement and leverage the analysis library as a<br>
&gt;&gt; whole.<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Marco<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On 13.05.2012 09:23, Alexander Bruy wrote:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Hi Etienne,<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; 2012/5/12 Etienne Tourigny&lt;<a href="mailto:etourigny.dev@gmail.com">etourigny.dev@gmail.com</a>&gt;:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; I stand corrected then - I guess I was confusing it with ftools, which<br>
&gt;&gt;&gt;&gt; is blocking and does not spawn a process.<br>
&gt;&gt;&gt;&gt; Any way ftools could be adapted to use the same approach as gdaltools?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; most fTools functions already implemented as threaded, but there are some<br>
&gt;&gt;&gt; minor issues. I work on improving processes handing in fTools, and several<br>
&gt;&gt;&gt; tools already don&#39;t block main QGIS window, has non-modal dialogs and<br>
&gt;&gt;&gt; allows<br>
&gt;&gt;&gt; to cancel running process.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Also I think about rewritting fTools in C++ and integrating its<br>
&gt;&gt;&gt; algorithms into QGIS<br>
&gt;&gt;&gt; analysis library. This makes tools a bit faster and will allow to use<br>
&gt;&gt;&gt; algorithms in<br>
&gt;&gt;&gt; plugins<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Dr. Marco Hugentobler<br>
&gt;&gt; Sourcepole -  Linux&amp;  Open Source Solutions<br>
&gt;&gt; Churerstrasse 22, CH-8808 Pfäffikon SZ, Switzerland<br>
&gt;&gt; <a href="mailto:marco.hugentobler@sourcepole.ch">marco.hugentobler@sourcepole.ch</a> <a href="http://www.sourcepole.ch" target="_blank">http://www.sourcepole.ch</a><br>
&gt;&gt; Technical Advisor QGIS Project Steering Committee<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Qgis-developer mailing list<br>
&gt;&gt; <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
&gt;&gt; <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
&gt; _______________________________________________<br>
&gt; Qgis-developer mailing list<br>
&gt; <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br>