how to display .txt file contents to the browser using python
<p>We have a <code>test.py</code> that should display a <code>.png</code> file and <code>.txt</code> file in same browser. Below is my code:</p>

<pre><code>print "Content-type: image/png\n"
print file(r"/var/www/cgi-bin/testpie.png", "rb").read()
myurl = "file://var/www/html/test.txt"

webbrowser.open(myurl)
</code></pre>

<p>But I am getting only <code>.png</code> file in the browser. So how can I display both in browser using python?</p>
