[Pythonmac-SIG] MachoPython 2.2.2 build question

Russell E Owen owen@astro.washington.edu
Wed, 6 Nov 2002 10:03:24 -0800


>On Tuesday, November 5, 2002, at 04:54  PM, Russell E Owen wrote:
>
>>I tried to build MachoPython 2.2.2 with aqua Tk and ran into a 
>>snag: Tkinter acts oddly.
>
>>this puts up a Tk root window, as usual, but whenever I try to 
>>click on the Tk window, I get:
>>>>>  SetFrontProcess failed,-606
>
>Add add a shell script named pythonw to /usr/local/bin or somewhere 
>else in your PATH
>
>#!/bin/sh
>exec 
>/Library/Frameworks/Python.framework/Versions/Current/Resources/Python.app/Contents/MacOS/python 
>"$@"
>
>use pythonw to launch GUI apps.

Thank you very much. That pretty much did the trick.

However, most of my files start with #!/usr/local/bin/python. Is 
there any way to get that to work? At present, running such files as 
commands leads to unusable windows, an ugly pitfall.

I tried the obvious (delete /usr/local/bin/python and rename 
/usr/local/bin/pythonw to it); typing python at the prompt does bring 
up a copy of python that can be used for Tkinter. However, any files 
that start with #!/usr/local/bin/python will *NOT* run (and it looks 
as if the #! line is totally failing to run).

While I'm on the subject of 2.2.2, should I be worried that test_sax 
and test_pyexpat are unexpectedly skipped after a "make test"? I fear 
this means that the xml stuff is broken, but am not certain. (I'm not 
using xml anyway, but do want to be sure that any unknown bugs are 
reported.)

I'm thrilled to finally have aqua Tk support working (though still 
hope to get execution-as-a-command working again). I have posted 
instructions for building Python 2.2.2 with readlines and aqua 
Tkinter support on MacOS 10.2; see the link at: 
<http://www.astro.washington.edu/owen>.

-- Russell

P.S. when Python is via exec... it claims to be Python 2.3a0 (#1, Sep 
6 2002, 20:20:16), even though I built 2.2.2. I suspect this is a 
quirk of the 2.2.2 source code.