A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-January/041975.html below:

[Pythonmac-SIG] Re: [Python-Dev] patching webbrowser.py for OS X

[Pythonmac-SIG] Re: [Python-Dev] patching webbrowser.py for OS XBob Ippolito bob at redivi.com
Tue Jan 13 01:27:43 EST 2004
On Jan 13, 2004, at 1:13 AM, Ronald Oussoren wrote:

> 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').

insecure?

 >>> from __future__ import audited_code
   File "<stdin>", line 1
SyntaxError: future feature audited_code is not defined

FWIW, ic.launchurl('file:///bin/ls') will do the same thing: open a 
Terminal.app window and execute /bin/ls.

Safari will open a Finder window at "/bin" and select the "ls" 
executable.  I'm not sure where the code is that handles unsafe URLs 
differently, but it's probably somewhere near WebCore.. probably not in 
Safari itself?  I'd have to care, then I'd have to look :)

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-dev/attachments/20040113/5660f28c/smime.bin
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4