Connecting Tech Pros Worldwide Forums | Help | Site Map

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

dmsbox2000-list1@yahoo.com
Guest
 
Posts: n/a
#1: Mar 12 '06
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


Diez B. Roggisch
Guest
 
Posts: n/a
#2: Mar 12 '06

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


dmsbox2000-list1@yahoo.com schrieb:[color=blue]
> 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.[/color]

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

Diez
dmsbox2000-list1@yahoo.com
Guest
 
Posts: n/a
#3: Mar 13 '06

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


> Install python using fink, and invoke that. Should work against X11 for[color=blue]
> all GUI-Toolkits.[/color]

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.

Diez B. Roggisch
Guest
 
Posts: n/a
#4: Mar 13 '06

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


dmsbox2000-list1@yahoo.com schrieb:[color=blue][color=green]
>> Install python using fink, and invoke that. Should work against X11 for
>> all GUI-Toolkits.[/color]
>
> 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).[/color]

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.
[color=blue]
> 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.[/color]

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

Diez
Kevin Walzer
Guest
 
Posts: n/a
#5: Mar 13 '06

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


dmsbox2000-list1@yahoo.com wrote:[color=blue]
> 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
>[/color]

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
Closed Thread