<div dir="ltr"><div>Richard,</div><div><br></div><div>Thanks for testing this. I was afraid there might be some OS dependencies with this. Do you have Google Earth installed on your Debian machine? Is there a proper way to send a KML to a Linux Google Earth from python?</div><div><br></div><div>Calvin<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 2:58 PM Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net">rdmailings@duif.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 11/03/2019 15.04, C Hamilton wrote:<br>
> I've had a request for Lat Lon Tools to support Google Earth with its<br>
> "Show in External Map" tool. I could create a temporary KML file and<br>
> make one of the following calls.<br>
> <br>
> os.startfile('path to kml file')<br>
> webbrowser.open('path to kml file')<br>
> <br>
> For the Linux and Mac users, do these work and which is preferable? They<br>
> both work on Windows.<br>
<br>
Hi C,<br>
not sure how to test this but I (Debian) created a simple kml file in<br>
/tmp/test.kml and then tried your calls:<br>
<br>
import os<br>
os.startfile('/tmp/test.kml')<br>
Traceback (most recent call last):<br>
  File "/usr/lib/python3.7/code.py", line 90, in runcode<br>
    exec(code, self.locals)<br>
  File "<input>", line 1, in <module><br>
AttributeError: module 'os' has no attribute 'startfile'<br>
<br>
import webbrowser<br>
webbrowser.open('/tmp/test.kml')<br>
True<br>
<br>
Opens this test.kml but off course trying to open it in browser<br>
<br>
HTH & regards<br>
<br>
Richard Duivenvoorde<br>
</blockquote></div>