[Python-Dev] patching webbrowser.py for OS X

Ronald Oussoren oussoren at cistron.nl
Tue Jan 13 01:13:30 EST 2004


On 12 jan 2004, at 21:16, Bob Ippolito wrote:

> On Jan 12, 2004, at 2:59 PM, Alex Martelli wrote:
>
>>
>> On Jan 12, 2004, at 8:45 PM, Brendan O'Connor wrote:
>>
>>> I was trying to use the webbrowser module with OS X's preinstalled
>>> python; I'm not very familiar with OS X, but I just patched 
>>> webbrowser.py
>>> to use the very generic "open" command, which works for the simple
>>> webbrowser.open(url).
>>>
>>> I've heard that Fink or another port would be more complete; on the 
>>> other
>>> hand, I'm using computers where I can't install software myself, so 
>>> this
>>> is useful for me.
>>>
>>> Any thoughts or issues?
>>
>> As a brand-new user of Mac OS X, "open" appears to be the right 
>> solution to me, picking up whatever settings one may have made for a 
>> different browser than Safari, not requiring fink, etc, etc.  
>> However, we should probably double-check on pythonmac-sig, where the 
>> REAL Mac Pythonistas hang out...
>
> I don't think that this patch is necessary..

It might even be insecure, open will open more than just URLs (try 
'open /bin/ls').

Ronald




More information about the Python-Dev mailing list