[Pythonmac-SIG] Fwd: Re: Jaguar Macho Build woes
Lance E Sloan
lsloan@umich.edu
Fri, 27 Sep 2002 09:06:32 -0400
Bob Ippolito sent me the following message about how to make a simple
pythonw script for Mac OS X. In a later message he recommended to me that
I really should try using Python 2.3 rather than 2.2. While 2.3 is
bleeding edge, it has a lot of improvements for OS X.
---------- Forwarded Message ----------
Date: Thursday, September 26, 2002 13:24 -0400
From: Bob Ippolito <bob@redivi.com>
To: Lance E Sloan <lsloan@umich.edu>
Subject: Re: [Pythonmac-SIG] Jaguar Macho Build woes
On Thursday, September 26, 2002, at 12:21 PM, Lance E Sloan wrote:
> --On Wednesday, September 25, 2002 12:29 -0500 "Stephen R. Figgins"
> <fig@monitor.net> wrote:
>> I am following Tony Lownds instructions for Macho Python + Tkinter and
>> compiling on Jaguar.
>
> Isn't it fun? :)
>
> When I followed his instructions, I couldn't get it to build without
> an X11 package (like XDarwin) installed. I didn't want to install
> X11. I emailed Tony and he suggested that I download the latest
> source release of Tcl/Tk (8.4.0) and build the frameworks myself,
> rather than using the pre-release versions (8.4a4) of the binaries
> that are available.
>
> Tony forwarded some instructions from the Mac TCL mailing list
> (tcl-mac@lists.sourceforge.net) for building the frameworks. I did
> that, then I followed Tony's instructions from step three onward and
> I've ended up with a working Python.app with IDLE.
>
> The problem I've had is that if I run this new Python interpreter from
> a Terminal shell prompt, when I use Tkinter to open a Tk window, if I
> try to click on that window, I get an error, "SetFrontProcess
> failed,-606". Tony said this is happening a lot. He suggested I use
> pythonw, which didn't build for me and I haven't figured out how to do
> it yet, or try Python 2.3 which "automagically" builds a Mac IDE for
> Python and apparently doesn't have this problem. I haven't had time
> to try that yet.
This is a "feature" of the Mac OS X window server. pythonw is a script
that looks like:
# !/bin/sh
exec "/Library/Frameworks/../../Library/Frameworks/Python.framework/
Versions/2.3/Resources/Python.app/Contents/MacOS/python" "$@"
Basically, WindowServer *will not* give you an opportunity to create
windows that can respond to events unless the process is started with a
/Full/Path/To/The/Executable (and a few other conditions).. Doesn't make a
whole lot of sense, but that's how it is. using pythonw makes certain
that your command line starts python with a full executable path (where
your shell will not, the argv[0] will be more or less whatever you typed,
not where it actually is).
-bob
---------- End Forwarded Message ----------
--
Lance E Sloan
Web Services, Univ. of Michigan: Full-service Web and database design,
development, and hosting. Specializing in Python & Perl CGIs.
http://websvcs.itd.umich.edu/ - "Putting U on the Web"