[Pythonmac-SIG] MachoPython 2.2.2 build works; 3 minor questions

Jack Jansen Jack.Jansen@oratrix.com
Sun, 10 Nov 2002 21:15:01 +0100


On vrijdag, nov 8, 2002, at 18:56 Europe/Amsterdam, Russell E Owen 
wrote:
>>> 2) Is it possible to make a Python/Tkinter source file that can be 
>>> run as a command (i.e. that has a working #! line...
>>
>> #! /Applications/Python.app/Contents/MacOS/python
>> Not pretty, but it works.
>
> Unfortunately, it works exactly like #!/usr/local/lib/python: the 
> Python code runs (which is a big step forward from 
> #!/usr/local/bin/pythonw), but one cannot bring Tk windows to the 
> front!

Strange... The first thing to check is whether this thing behaves as a 
"real" application. If it is a real application it should have a dock 
icon and a menubar. My guess is that it won't. (I.e. if you *do* have 
an icon and a menubar but you cannot bring windows to the front you've 
found a problem that is new to me).

If it doesn't have an icon the problem is that the program isn't 
properly registered with the window server, and we have to find out why 
not. Try printing sys.executable at the top of your script. It should 
be /Applications/Python.app/Contents/MacOS/python . If it isn't: let us 
know what it is. If it is then somehow your python.app bundle is 
broken. Try rmoving it and building it again.
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma 
Goldman -