[Pythonmac-SIG] pythonw
Bob Ippolito
bob at redivi.com
Mon Feb 7 18:43:48 CET 2005
On Feb 7, 2005, at 12:12, has wrote:
> Bob Ippolito wrote:
>
>>> Would it be possible to keep /usr/bin/python as a full-fledged
>>> interpreter while adding to it the ability to automatically start a
>>> second interpreter at a known location when needed?
>>
>> "when needed" is ambiguous. You don't know you need it until you're
>> well into running Python code. If you knew you needed it in the
>> first place, you'd have run the code with pythonw.
>
> Fair point. So what's the process by which the interpreter's path
> becomes needed, and who exactly is doing the asking?
Whenever you end up attempting to make a WindowServer connection, which
happens when you go through certain Carbon, Cocoa, and probably
CoreGraphics code.
>> It's unlikely that Apple will ever fix this problem for users. I
>> bugged them about it in 2001, and they damn well know the workaround
>> because it's in GLUT (AFTER I had reported it) and Java. We should
>> instead use their private SPI and include the workaround in Tk, wx,
>> SDL, etc.
>
> How much work, and how safe, would that be?
Five or six lines of code per framework. It's safe enough as long as
the symbol is looked up dynamically or weak linked in case it goes
away. The code has worked since Mac OS X 10.1 and still works on 10.3
(I don't remember if I've tried it on anything newer..).
-bob
More information about the Pythonmac-SIG
mailing list