
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