[Patches] [ python-Patches-502205 ] Fix webbrowser running on MachoPython

noreply@sourceforge.net noreply@sourceforge.net
Thu, 10 Jan 2002 22:26:43 -0800


Patches item #502205, was opened at 2002-01-10 22:26
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=502205&group_id=5470

Category: Macintosh
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven J. Burr (sburrious)
Assigned to: Jack Jansen (jackjansen)
Summary: Fix webbrowser running on MachoPython

Initial Comment:
Allows webbrowser.open call in the Unix version of python running on Mac OS X to open a url in Internet Explorer.  Presently, a call to webbrowser.open on this platform either runs a terminal-based browser, such as lynx, if available, or fails.

The patch is a context diff against version 1.27 of webbrowser, which appears to be the latest version in CVS.  It adds a MacOSX browser class and a test for Mac OS X systems running the Unix version of python.  I have tested it successfully several times on my Mac OS X system.

I included:

    assert url not in "'"

from the 1.27 version in the MacOSX open method, even though the method calls os.popen rather than os.system to launch the browser.  It seemed likely os.popen would raise similar security concerns.

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=502205&group_id=5470