Darwin + Tkinter + Aqua-Tk? (Re: Macintosh Development)

Tony Lownds tony-clpy at lownds.com
Wed Apr 17 22:16:04 EDT 2002


> In theory, it would seem that you could install Unix python
> on Mac OS X together with the Aqua version of Tcl/Tk, and
> run Tkinter stuff.
> 

You sure can! AquaTk is very far along, probably 90%+

> When I tried this recently, however, it didn't work. I
> got a Tkinter window, but it was "dead" -- it didn't
> respond to mouse clicks. Tcl applications run using
> wish worked, but it wouldn't work from Python for
> some reason.
> 

With the second alpha file release of the AquaTk stuff on
http://tcl.sf.net,
this won't happen.

> I'd be interested if anyone happens to know how to
> get this to work!

Essentially, build Python.app according to Python-2.2/Mac/OSX after
adding this to Python/Modules/Setup.local:

_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \
        -framework Tcl -framework Tk \
#       -DTK_FRAMEWORK \
        -I/Library/Frameworks/Tcl.framework/Headers/ \
        -I/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeaders/
\
        -I/Library/Frameworks/Tk.framework/Headers/ \
        -I/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders/
\
        -I/usr/X11R6/include/ 

The headers in AquaTk don't work with Darwin's way finding of finding
them. If that gets fixed, then just the -DTK_FRAMEWORK option will be
needed and not the -I options.


-Tony



More information about the Python-list mailing list