State of the art: Tkinter, Tk 8.5, Tix?

E

excord80

Does Python work with Tk 8.5? I'm manually installing my own Python
2.6.1 (separate from my system's Python 2.5.2), and am about to
install my own Tcl/Tk 8.5 but am unsure how to make them talk to
eachother. Should I install Tk first? If I put Tk into my home
directory (under "~/opt" most likely), is there some configure option
I need to pass Python to tell it where to find my Tk?

Also, I see that Python comes with Tix. Was Tix supposed to be
something to make up for what was lacking in Tk prior to its 8.5
release? Is Tix here to stay, or has it been eclipsed by what comes
with Tk 8.5 OOTB?
 
R

Roger

Does Python work with Tk 8.5? I'm manually installing my own Python
2.6.1 (separate from my system's Python 2.5.2), and am about to
install my own Tcl/Tk 8.5 but am unsure how to make them talk to
eachother. Should I install Tk first? If I put Tk into my home
directory (under "~/opt" most likely), is there some configure option
I need to pass Python to tell it where to find my Tk?

Also, I see that Python comes with Tix. Was Tix supposed to be
something to make up for what was lacking in Tk prior to its 8.5
release? Is Tix here to stay, or has it been eclipsed by what comes
with Tk 8.5 OOTB?

I'm curious about this too. If no one responds please let us know how
it goes.
 
E

Eric Brunel

Does Python work with Tk 8.5? I'm manually installing my own Python
2.6.1 (separate from my system's Python 2.5.2), and am about to
install my own Tcl/Tk 8.5 but am unsure how to make them talk to
eachother. Should I install Tk first? If I put Tk into my home
directory (under "~/opt" most likely), is there some configure option
I need to pass Python to tell it where to find my Tk?

There's some important information missing here: the platform you're on...

Anyway, you should indeed install tcl/tk first. Then, assuming you're on
Linux, you should edit the file named Setup in the Modules sub-directory
of your Python installation, find the lines for the _tkinter module and
edit them to match your installation. Then, you can build and install
Python and it should work without problem.

As for Python 2.6 / tk 8.5 compatibility, it depends on what you want to
do. Since tk 8.5 still offers the 'regular' tk widgets, these will work in
Python 2.6. If you want the new widgets (aka ttk), I'm not sure there are
official wrappers for them in the distro (there weren't any last time I
checked). If there aren't, you can find the 'pre-official' ones here:
http://pypi.python.org/pypi/pyttk
Also, I see that Python comes with Tix. Was Tix supposed to be
something to make up for what was lacking in Tk prior to its 8.5
release? Is Tix here to stay, or has it been eclipsed by what comes
with Tk 8.5 OOTB?

I've never worked with Tix myself, but I'd say the widget set offered by
tk/ttk is now quite complete.

HTH
 
R

r

We need TK 8.5's themes. This will bring Tkinter out of the dark ages
and into the 21st Century! And improve the shine of the Python base
distro. Python could use a good boost right now!
 
E

excord80

We need TK 8.5's themes. This will bring Tkinter out of the dark ages
and into the 21st Century! And improve the shine of the Python base
distro. Python could use a good boost right now!

Could someone please explain what Tix provides compared to what the
new stuff in Tk 8.5 provides? Is there much overlap?
 
R

r

Could someone please explain what Tix provides compared to what the
new stuff in Tk 8.5 provides? Is there much overlap?

TIX is just a set of compound widgets that were not included in the
base Python Tkinter distro(notebook, label entry, etc... Now, it looks
like they are standard. The new 8.5 TK includes support for OS
specific themes, so as to give a more native feel to TK apps, hence
the 21st century analogy :)
 
K

Kevin Walzer

excord80 said:
Could someone please explain what Tix provides compared to what the
new stuff in Tk 8.5 provides? Is there much overlap?

Tix is a compiled Tk extension that adds a good number of widgets to the
base set, such as a notebook tab, treeview, combobox, and others; Python
includes a Tix wrapper as part of the standard library. However, it has
not undergone much development over the past several years, and its
widgets look very outdated (they have a mid-90s feel to them).

The themed Tk widgets (ttk) that come with Tk 8.5 add a lot of the same
things that Tix does, but they do so in a more modern way, hooking into
platform-specific themes and API's wherever possible (XP, Vista, Mac)
and updating the generic X11 look as well. As such, they are more
appropriate for modern development. Tix is more of a legacy toolkit.

A Python wrapper for ttk can be found here:
http://code.google.com/p/python-ttk/
It will be added to the standard library at some point, probably for
Python 3.1.

Here are some screenshots:

http://code.google.com/p/python-ttk/wiki/Screenshots

HTH,
Kevin
 
Ð

Дамјан ГеоргиевÑки

The themed Tk widgets (ttk) that come with Tk 8.5 add a lot of the
same things that Tix does, but they do so in a more modern way,
hooking into platform-specific themes and API's wherever possible (XP,
Vista, Mac) and updating the generic X11 look as well. As such, they
are more appropriate for modern development. Tix is more of a legacy
toolkit.

Interesting... so to summarize, what do I get from Python/TK on *Linux*
with tkinter beeing dynamically linked to the system tk 8.5.6 ?

Especially I'd like to know if it will support fontconfig/TTF/antialiased fonts?
 

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
474,037
Messages
2,570,371
Members
47,013
Latest member
JewellChes

Latest Threads

Top