[ python-Bugs-1684254 ] regression in webbrowser command line parsing

SourceForge.net noreply at sourceforge.net
Tue Mar 20 12:09:15 CET 2007


Bugs item #1684254, was opened at 2007-03-20 12:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1684254&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Lukas Lalinsky (luks)
Assigned to: Nobody/Anonymous (nobody)
Summary: regression in webbrowser command line parsing

Initial Comment:
With Python 2.4 it was common to use BROWSER environment variables like:

BROWSER="firefox '%s' &"

to launch a browser. The apostrophes around %s are required to escape special characters in the URL (because the command is launched using os.system, which uses a shell), and & at the end is required to not block GUI applications. However, in Python 2.5 it uses the subprocess module, and the example above doesn't work. It tries to open `firefox 'URL' &` literally, which causes Firefox to open URIs like file:///path/to/current/directory/'URL'.

Attached a patch that fixes the problem.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1684254&group_id=5470


More information about the Python-bugs-list mailing list