Tkinter updates - Easiest way to install/use Tile?

Eric Brunel see.signature at no.spam
Thu Aug 14 05:01:32 EDT 2008


On Wed, 13 Aug 2008 19:10:47 +0200, Mudcat <mnations at gmail.com> wrote:
[snip]
> I was reading about Tile, and it sounds like I should be able to wrap
> a style around my current code to give it a different look. However it
> doesn't sound like it's quite ready for prime time yet. I downloaded
> the latest stable version of Python 2.5 which apparently still uses
> Tcl 8.4. So my options at this point appear to be:
>
> 1) Download beta version of Python 2.6 which has Tcl 8.5.
> Tile is supposed to be included with Tcl 8.5, but there's not much
> information on how to use it with older code. Do I still need wrapper
> code, or if I install 2.6 will it be available already.

Well, if you do it today and look in the Lib/lib-tk directory, you'll see  
that there is nothing specific to Tile/ttk in any of the module. So ATM,  
new wrappers are needed indeed. If I had to say which wrappers have the  
best chance to actually become "official", I'd bet on Guilherme Polo's  
ones here:
http://gpolo.ath.cx:81/projects/ttk_to_tkinter/
These seem to be the most complete, and somebody's actually working on  
them.

> 2) Install Tcl 8.5 to use with Python 2.5.
> How do you do this? In other posts it mentions recompiling source tcl
> code with Python. If that's the case it doesn't sound like something I
> want to mess with. If I stray too far from default configurations I
> start to have problems with py2exe.

I guess it would probably be better to at least recompile the _tkinter.c  
module to get the new tcl/tk header files. I think I also read somewhere  
that there were API incompatibilities between tcl/tk 8.4 and 8.5. Don't  
know if it has any impact on Tkinter.

> 3) Install Tile with Python 2.5 and Tcl 8.4 and use wrapper code to
> make it work.
> However all the posts concerning this approach assume that Tile is
> already installed. I downloaded the code for the latest version of
> Tile which was a .kit extension. This also may need to be compiled,
> and if that's the case I again start to have problems with freezing my
> application.

This doesn't look like the way to go for me: you'll add the burden of  
having to install the Tile package at tcl/tk level while not gaining  
anything, since you'll still have to use wrappers that may or may not be  
official in the end.

> What's the easiest way to do this? I really couldn't find a place that
> gave instructions for any of the current release configurations. It
> sounds if it's available already in Python 2.6 that it would be the
> easiest way, but I couldn't find any threads talking about the
> availability of it for that release yet.

As I said above, if I had to choose today, I'd go Python 2.6 + tcl/tk 8.5  
+ Guilherme Polo's ttk wrappers.

But if you can do it, I'd say: just wait. Things are moving fast: the  
latest Python 2.6 beta release is less than a month old, and Guilherme  
Polo has marked his ttk wrappers project as complete only 3 days ago. So  
maybe the next Python beta will actually include them... And BTW, the  
final release for Python 2.6 is planned at the beginning of October, so  
this is not that far away.

HTH
-- 
python -c "print ''.join([chr(154 - ord(c)) for c in  
'U(17zX(%,5.zmz5(17l8(%,5.Z*(93-965$l7+-'])"



More information about the Python-list mailing list