[Pythonmac-SIG] Tkinter and Python 2.2

Jack Jansen Jack.Jansen at cwi.nl
Wed Dec 22 11:06:55 CET 2004


> If I have the source code for TkAqua, can it be modified and 
> recompiled as
> a separate binary for PoserPython? [I'm guessing this is preferable to
> trying to get one instance of TkAqua to work for both instances of 
> Python]
> Does it make any difference if I don't have any other instances of 
> TkAqua
> on my system?  </quote>

I don't think there's any need to recompile TkAqua, or anything drastic 
like that.
If you have TkAqua installed on your system the only thing you really 
need to do is build the _tkinter extension module against that TkAqua.

Now, depending on how old the Python is that PoserPython is based on 
this may be a bit of work, but doable. If PoserPython's version is one 
that already supported linking against AquaTk you just rip the relevant 
portion out of the toplevel setup.py for that Python version. If the Tk 
support code in setup.py has all sorts of references to "-framework Tk" 
  then that should work.

If it appears that setup.py for the relevant Python version does not 
support AuqaTk then there's a bit more work to do. You can try to get 
setup.py from a recent (2.3 or later) Python distribution and working 
from there.

Trying to isolate only the _tkinter-relevant code in Python's main 
setup.py can be a bit daunting. It may be worthwhile to look at the 
setup.py for Fredrik Lund's PIL (the Python imaging l,ibrary) package. 
It has also isolated and duplicated/modified the _tkinter build code 
and incorporated it into their own setup.py (because PIL will 
optionally build a custom _tkinter that has support for PIL images).
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman



More information about the Pythonmac-SIG mailing list