On Jan 15, 8:14 pm, Timur Tabi <ti...@freescale.com> wrote:
> After reading several web pages and mailing list threads, I've learned
> that the webbrowser module does not really support opening local
> files, even if I use a file:// URL designator.  In most cases,
> webbrowser.open() will indeed open the default web browser, but with
> Python 2.6 on my Fedora 10 system, it opens a text editor instead.  On
> Python 2.5, it opens the default web browser.
>
> This is a problem because my Python script creates a local HTML file
> and I want it displayed on the web browser.
>
> So is there any way to force webbrowser.open() to always use an actual
> web browser?
>
> --
> Timur Tabi
> Linux kernel developer at Freescale

Might not be useful, but trying open_new_tab() on...

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser as wb
>>> x = wb.get()
>>> x.basename
'gnome-open'

When attempting to use open_new_tab(), I get:

file:///home/jon/blahblah.html - opens in Firefox
file:///home/jon/blahblah.txt  - opens in gedit

Jon.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to