Tkinter / Mac OS X Question (Aqua vs. X11)

D

dmsbox2000-list1

I am running Mac OS X. I have Tcl/Tk installed. I can run the Aqua
version (TkAqua) of wish by typing 'wish' at a terminal prompt. I can
run the X11 version (TkX11) of wish by typing 'wish8.4-X11' in an
x-term. If I run python and import Tkinter it always grabs the TkAqua
version. How can I get Tkinter to load the TkX11 version?

I want to be able to switch back and forth between the two at will.

Thanks
David
 
D

Diez B. Roggisch

I am running Mac OS X. I have Tcl/Tk installed. I can run the Aqua
version (TkAqua) of wish by typing 'wish' at a terminal prompt. I can
run the X11 version (TkX11) of wish by typing 'wish8.4-X11' in an
x-term. If I run python and import Tkinter it always grabs the TkAqua
version. How can I get Tkinter to load the TkX11 version?

I want to be able to switch back and forth between the two at will.

Install python using fink, and invoke that. Should work against X11 for
all GUI-Toolkits.

Diez
 
D

dmsbox2000-list1

Install python using fink, and invoke that. Should work against X11 for
all GUI-Toolkits.

I prefer not to do this. Darwin is already a Unix, and Apple provides
a version of X11 that works well with it. Fink seems like an
unecessary layer that I would rather not mess with. Tcl/Tk has a very
simple way to select. It would be nice if Python did something similar
(command line option, an environment variable, whatever). I looked for
an option in the build process, and from what I can tell, the OS X
version looks like it only builds a single version (TkAqua).

TkAqua and TkX11 do differ, and it would be nice to see the same script
run under both Aqua and X11 without having to switch machines.
 
D

Diez B. Roggisch

I prefer not to do this. Darwin is already a Unix, and Apple provides
a version of X11 that works well with it.
Fink seems like an
unecessary layer that I would rather not mess with. Tcl/Tk has a very
simple way to select. It would be nice if Python did something similar
(command line option, an environment variable, whatever).

Fink works precisely _because_ OS X is a unix & has a X11 server. It is
no "layer", it is just precompiled package management for unix-software
running under OS X.
> I looked for
> an option in the build process, and from what I can tell, the OS X
> version looks like it only builds a single version (TkAqua).
TkAqua and TkX11 do differ, and it would be nice to see the same script
run under both Aqua and X11 without having to switch machines.

You might be able to tamper with the build process - but I have no idea
how to do so.

Diez
 
K

Kevin Walzer

I am running Mac OS X. I have Tcl/Tk installed. I can run the Aqua
version (TkAqua) of wish by typing 'wish' at a terminal prompt. I can
run the X11 version (TkX11) of wish by typing 'wish8.4-X11' in an
x-term. If I run python and import Tkinter it always grabs the TkAqua
version. How can I get Tkinter to load the TkX11 version?

I want to be able to switch back and forth between the two at will.

Thanks
David

I don't think the version of Python that ships with OS X by default is
compatible with the X11 environment. For one thing, it is built with the
"-framework" flag, which is how OS X packages libraries--this works
differently than on other *Nix environments. The Aqua version of Tcl/Tk
is also a framework build, and it's not compatible with the X11 version.
(The "wish8.4-x11" command is just a wrapper script that invokes a
completely different wish binary, linked against an entirely different
set of libraries.)

The advice to install Python and Tcl/Tk via Fink (or DarwinPorts) then
run your script against that is the right advice. It's a much cleaner
way to go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top