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

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?

Advertisements

On Jan 7, 2:31 pm, excord80 <> wrote:
> 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.

Advertisements

On Wed, 07 Jan 2009 20:31:23 +0100, excord80 <> wrote:
> 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.

On Jan 10, 11:45 am, r <> wrote:
> 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?

On Jan 10, 3:05 pm, excord80 <> wrote:
> On Jan 10, 11:45 am, r <> wrote:
>
> > 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?

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

excord80 wrote:
>
> 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.

excord80 wrote:
> On Jan 10, 11:45 am, r <> wrote:
>> 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?

> 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?

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!