webbrowser.open still gives problem with file://

K

krishnakant Mane

hello,
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.
with regards,
Krishnakant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top