By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,902 Members | 1,462 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,902 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Mar 12 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
dm**************@yahoo.com schrieb:
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
Mar 12 '06 #2

P: n/a
> 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.

Mar 13 '06 #3

P: n/a
dm**************@yahoo.com schrieb:
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).


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
Mar 13 '06 #4

P: n/a
dm**************@yahoo.com wrote:
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.

--
Kevin Walzer
iReveal: File Search Tool
http://www.wordtech-software.com
Mar 13 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.