[Qgis-user] Launching simpleHTTPServer from processing script or plugin

Andreas Plesch andreasplesch at netscape.net
Sun Mar 12 18:18:38 PDT 2017


I am starting to work on a processing script which has a html file as
output. The html file has js scripts which require it to be served from a
web server (httpd). The regular webkit viewer is not quite capable enough
but I can launch the system web browser using the webbrowser python package
from the script. However, I cannot figure out how to launch a
SimpleHTTPServer in a separate thread from the script. When I start a httpd
server from the script using the server_forever method the server is
launched but Qgis freezes. When I try to use threading following
 https://docs.python.org/2/library/socketserver.html#asynchronous-mixinsqgis
crashes. Would using a ThreadedTCPServer be the right approach ?

Any tips, examples, or thoughts much welcome. Should I subscribe and post
to qgis-developer ?

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170312/a89ec1d1/attachment.html>


More information about the Qgis-user mailing list