webbrowser.open still gives problem with file://
researchbase at gmail.com
Mon Nov 12 20:18:06 CET 2007
some days bac I posted a problem about webbrowser.open() not opening
the file on the local machine.
I get a few responses and I tryed working it out.
I also refered to the cookbook example posted on that thread.
I still can't figure out why
webbrowser.open("file:///home/krishna/documents/tut.html") does not
open the file.
as I mentioned earlier the url in the addressbar of mozilla firefox 3
alpha is "file:///home/krishna/"/home/krishna/documents/tut.html"
which is indeed wrong.
I have only got a hint so far that I can use a module called
BaseHTTPServer but I have not yet understood how it will help me to
solve the problem.
is it going to give the correct "file:///" to the webbrowser.open()?
if yes then how?
can some one post a simple example?
I don't need to create any class for this because some other code in
python is actually creating an html file and I just need to display it
in the browser.
so please help on this one.
More information about the Python-list