title: Python cgi script not opening a html file in local directory
body: <p>I have a simple python module that generates a web page containing a list of links. This page is automatically opened in a browser through <code>webbrowser.open('file://' + file.name)</code>: no problems here.<br>
  From this web page, when clicking on on a link (which has a href like <code>http://localhost/cgi-bin/script.py?param1=Something</code>) it lunches a cgi script that performs some operations with the passed value and at the end generates a new web page, stored locally in my machine (e.g. in a path like <code>/home/user/web/out/</code>) in a folder where I correctly set all rwx permissions.<br>
  Well, I've been trying to automatically open this new page in the browser for two days now, attempting with all the solutions I found searching through documentations and forums. I tried with <code>webbrowser.open()</code> again, but then I realized that I can't use it because from the web server  I can't open a new browser window itself. Then I tried with redirection, printing first a header (<code>print "Content-type: text/html\n\n"</code>) and then </p>
  
  <pre><code>print "Status: 302 Moved"
  print "Location: file:///home/user/web/out/abc.html\n\n"`
  </code></pre>
  
  <p>but this just shows a plain blank page. I gave a try to other redirecting solutions, like </p>
  
  <pre><code>print "&lt;meta http-equiv='refresh' content='0' url='file:///home/user/web/out/abc.html'&gt;"
  print "&lt;script type="text/javascript"&gt;location.href='file:///home/user/web/out/abc.html';&lt;/script&gt;"
  print "&lt;script type="text/javascript"&gt;windows.open('file:///home/user/web/out/abc.html');&lt;/script&gt;"
  </code></pre>
  
  <p>I even tried inserting a Button with a <code>POST</code> method that triggers the opening of the new page, without success: I keep getting a plain blank page.<br>
  It is worth to say that, if I manually open this <code>abc.html</code> page in the browser, it is properly shown.</p>
  
  <p>I think this has to do with the fact that the html page I'm opening from the web server is in locally stored, but I don't know how to solve this. Can somebody point me to the right direction?</p>