<div dir="ltr">I would like to launch a minimal web server from a processing script to serve html properly (rather than using the file protocol).<div><br></div><div>Since the web server needs to run and keep running separately from qgis or the qgis python interpreter, I investigated various ways to accomplish this using SimpleHTTPServer. On windows 2.18.7 as linux should be more robust.</div><div><br></div><div>- threading.Threat : start() works until the server actually serves a file. Then qgis crashes with a minidump . For some reason, the crashing happens not always but more often than not.</div><div>- multiprocessing : seems to be the recommended solution but I do not seem to have it with Qgis python (?)</div><div>- QProcess.start() : works from the python terminal, seems robust but does not seem to work from a processing script (?). Would be the preferred solution.</div><div>- QProcess.startDetached('python',(args),dir) : works reliably but requires killing and restarting the process to change the root directory served</div><div><br></div><div><div>This may all change with Qgis 3 but I suspect 2.18 will be around for a while, too.</div><div><br></div><div>Any recommendations or ideas would be welcome.</div><div><br></div><div>I will look into qgis2web to see what it does.</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div>