title: How to open an HTML file in the browser from Python?
body: <p>I am trying to open an HTML file from Python but my script just displays the contents of the HTML file in Python instead of opening it in the browser. How can I fix this problem? How can I open the HTML file in my Chrome browser?</p>
  
  <p>testdata.html</p>
  
  <pre><code>&lt;div&gt;
      &lt;a href="https://plot.ly/user001/2/" target="_blank" title="Success vs Failure" style="display: block; text-align: center;"&gt;&lt;img src="https://plot.ly/~user001/2.png" alt="Success vs Failure" style="max-width: 100%;width: 600px;"  width="600" onerror="this.onerror=null;this.src='https://plot.ly/404.png';" /&gt;&lt;/a&gt;
      &lt;script data-plotly="user001:2"  src="https://plot.ly/embed.js" async&gt;&lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Python 2.7 script:</p>
  
  <pre><code>import urllib
  page =  urllib.urlopen('testdata.html').read()
  print page
  </code></pre>