On 11/03/2019 15.04, C Hamilton wrote: > I've had a request for Lat Lon Tools to support Google Earth with its > "Show in External Map" tool. I could create a temporary KML file and > make one of the following calls. > > os.startfile('path to kml file') > webbrowser.open('path to kml file') > > For the Linux and Mac users, do these work and which is preferable? They > both work on Windows.
Hi C, not sure how to test this but I (Debian) created a simple kml file in /tmp/test.kml and then tried your calls: import os os.startfile('/tmp/test.kml') Traceback (most recent call last): File "/usr/lib/python3.7/code.py", line 90, in runcode exec(code, self.locals) File "<input>", line 1, in <module> AttributeError: module 'os' has no attribute 'startfile' import webbrowser webbrowser.open('/tmp/test.kml') True Opens this test.kml but off course trying to open it in browser HTH & regards Richard Duivenvoorde _______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer