[Pythonmac-SIG] How to get a Mac OS X version of Tcl/Tk rather than X11 version.

Ned Deily nad at acm.org
Thu Jan 27 20:18:15 CET 2011


In article <960836.10021.qm at web34405.mail.mud.yahoo.com>,
 Lou Pecora <lou_boog2000 at yahoo.com> wrote:

> I have an installation of Python 2.6.4 on my MacBook Pro (OS X 10.6) that by 
> default uses X11 windows and dialogs rather than the Mac version of those GUI 
> items.  In my googling and exchanges on other support groups I've come down 
> to 
> the problem may be with the Tcl/Tk installation using the "generic" X11 GUI 
> rather than the Mac version.  Does anyone know how I can change that in the 
> Tk 
> part of the python framework?

Which Tcl/Tk is used by Python depends on the way the Python you are 
using was built.  The Apple-supplied Pythons in OS X and the Pythons 
installed from python.org and some 3rd-party suppliers (like ActiveState 
Python) use the "native" Aqua Tk, the most common versions being those 
shipped by Apple with OS X or the ActiveState Tcl/Tk distribution of OS 
X.  Python 2.6.4 is not the version shipped by Apple in 10.6 so you must 
have built or installed another version. `which python` will tell you 
where it is installed.   If the path starts with "/opt/local/" chances 
are you using a MacPorts Python; currently the MacPorts Python uses a 
MacPorts Tk port which by default is built with X11, rather than as a 
Aqua Tk.  The MacPorts Tk port does have a "+quartz" variant which is 
supposed to build Aqua Tk but it currently does not work on 10.6.

To get back to using an Aqua Tk, you can install the most recent 2.6 
Python (2.6.6) from python.org:

    http://www.python.org/download/releases/2.6.6/

It uses Aqua Tk 8.4 and is 32-bit only.  Note that 2.7.1 and 3.1.3 (soon 
to be 3.2) are the current versions of Python.

-- 
 Ned Deily,
 nad at acm.org



More information about the Pythonmac-SIG mailing list