<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calling Web Page from python addin in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268046#M20654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried several different solutions and this one worked for me! Thanks all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2016 17:22:14 GMT</pubDate>
    <dc:creator>MicahBabinski</dc:creator>
    <dc:date>2016-10-07T17:22:14Z</dc:date>
    <item>
      <title>Calling Web Page from python addin</title>
      <link>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268043#M20651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using either one the following statements to call a url from a python addin using a thread. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #os.startfile(url)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; #webbrowser.open(url,new=0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Both work with default browsers are either chrome or firefox. The problem it crashes ArcMap when MS Explorer 9 is the default browser. Anyone ran across this? Any suggestions? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Larry E. White &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Analyst/Programmer &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;West Virginia Department of Environmental Protection&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 11:46:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268043#M20651</guid>
      <dc:creator>LarryWhite</dc:creator>
      <dc:date>2013-10-25T11:46:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Web Page from python addin</title>
      <link>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268044#M20652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The uncommented code works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;this works: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # this works for explorer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ie = webbrowser.get('c:\\program files\\internet explorer\\iexplore.exe')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ie.open(url)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am using either one the following statements to call a url from a python addin using a thread. &lt;BR /&gt; #os.startfile(url)&lt;BR /&gt; #webbrowser.open(url,new=0)&lt;BR /&gt;&lt;BR /&gt;Both work with default browsers are either chrome or firefox. The problem it crashes ArcMap when MS Explorer 9 is the default browser. Anyone ran across this? Any suggestions? &lt;BR /&gt;&lt;BR /&gt;Larry E. White &lt;BR /&gt;GIS Analyst/Programmer &lt;BR /&gt;West Virginia Department of Environmental Protection&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 13:15:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268044#M20652</guid>
      <dc:creator>LarryWhite</dc:creator>
      <dc:date>2013-10-25T13:15:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Web Page from python addin</title>
      <link>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268045#M20653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN style="font-family:Courier New;"&gt;os.startfile&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;webbrowser.open&lt;/SPAN&gt;&lt;SPAN&gt; use COM to do their thing, and they expect the COM runtime to be initialized differently from how ArcGIS does it. You can get around it by calling the function in a different thread.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
def open_browser(url):
&amp;nbsp;&amp;nbsp;&amp;nbsp; import threading
&amp;nbsp;&amp;nbsp;&amp;nbsp; import webbrowser
&amp;nbsp;&amp;nbsp;&amp;nbsp; threading.Thread(target=webbrowser.open, args=(url,)).start()
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:08:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268045#M20653</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2021-12-11T13:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Web Page from python addin</title>
      <link>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268046#M20654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried several different solutions and this one worked for me! Thanks all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 17:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-web-page-from-python-addin/m-p/268046#M20654</guid>
      <dc:creator>MicahBabinski</dc:creator>
      <dc:date>2016-10-07T17:22:14Z</dc:date>
    </item>
  </channel>
</rss>

