Mac OSX oddities (compiling Python plus tkinter)

Kevin Walzer sw at wordtech-software.com
Wed Nov 23 08:44:52 EST 2005


MichaelW wrote:
> I've been Python (2.3.4) plus Tkinter happily under MacOX 10.3, having
> compiled them from scatch. (Tkinter is based on tcl/tk 8.4.1, which
> were compiled from source via Fink).
> 
> I then moved my laptop over the 10.4, and things are now breaking.
> Using the Python shipped with 10.4 (which has Tkinter based on tcl/tk
> 8.4.7) the window in a particular application looks completely
> different (more Apple-like) and the buttons no longer work properly.
> (Oddly, some icons have fallen off the buttons.) I therefore thought I
> might compile Python from scratch and that fell over with messages:
> 
> sem_init: Function not implemented
> sem_wait: Bad file descriptor
> sem_post: Bad file descriptor
> 
> reported at intervals. I assume the odd Tkinter behaviour is due to
> problems Apple created Apple-ising it?  Is that correct, or has there
> been a major change to the API between 8,4 and 8.7?. Is there any
> work-around? Secondly, can I assume that the compiler messages indicate
> a problem with the compiler (gcc select 3.3 makes no difference, BTW).
> 
> Your ideas would be appreciated.
> 
> Cheers
> MichaelW
> 
There were not huge changes between Tk 8.4.1 and 8.4.7. However, if you 
were using Tk from Fink before and now are using the Apple version of 
Tk, that may account for the difference. Tk from Fink is targeted for 
X11, while the Apple-installed Tk is targeted to the Aqua windowing 
environment. Tk itself is portable, but some of the extension packages 
for it (such as BLT, and presumably any Pythonesque wrappers for them) 
do not work on Aqua. Similarly, some bugs have arisen in Aqua's 
implementation of Tk (pixmaps do not display in menus, tearoff menus do 
not work properly), etc.

Also, did you compile Python as a Carbon framework build (makes use of 
the Apple's windowing environment)? What version are you now running?

-- 
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com



More information about the Python-list mailing list