Re: webbrowser module bug?
- From: Paul Boddie <paul@xxxxxxxxxxxxx>
- Date: 25 May 2007 16:18:51 -0700
Ron Adam wrote:
Reseting the default browser with the gnome default application window
confirmed this. The browser selection can either have the quotes around
the args "%s" paremteter, or not depending on how and what sets it.
Seems to me it should be quoted unless spaces in path names are never a
problem in Linux. So this could be both a python bug and a Gnome desktop
bug. Firefox probably does the right thing by putting the quotes around
it, but that causes problems for webbrowser.py, which doesn't expect them.
Quoting arguments in the way described is the safe, easy option (with
some potential problems with ' characters that can be worked around),
and I imagine that it's done precisely because other applications
could pass a path with spaces as the URL, and that such applications
would be invoking the command in a shell environment. Sadly, this
conflicts with any other precautionary measures, causing a degree of
"overquoting".
Resetting the GNOME default is a workaround, but I'm not convinced
that it would be satisfactory. What happens if you try and open an
HTML file, in the file browser or some other application which uses
the desktop preferences, where the filename contains spaces?
Paul
.
- Follow-Ups:
- Re: webbrowser module bug?
- From: Ron Adam
- Re: webbrowser module bug?
- References:
- webbrowser module bug?
- From: Ron Adam
- Re: webbrowser module bug?
- From: Paul Boddie
- Re: webbrowser module bug?
- From: Ron Adam
- webbrowser module bug?
- Prev by Date: Re: matplotlib, usetex
- Next by Date: Re: csv.reader length?
- Previous by thread: Re: webbrowser module bug?
- Next by thread: Re: webbrowser module bug?
- Index(es):
Relevant Pages
|
|