Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 13th, 2008, 06:15 PM
Mudcat
Guest
 
Posts: n/a
Default Tkinter updates - Easiest way to install/use Tile?

So I haven't programmed much in Python the past couple of years and
have been catching up the last few days by reading the boards. I'll be
making commercial Python applications again and wanted to see what's
new in the Gui department.

I started using Tkinter several years ago and have a lot of stuff
written in it. As a result, it's hard to switch to another interface
(wxPython, PyQt, etc) with all the hours it would take to reproduce
code I will re-use. (I mention this to avoid the inevitable post
asking why I'm still using it). While I was able to produce some nice
applications in the past and am comfortable with the functionality I
was able to achieve I still wanted to find a way to improve the look
since the old look is even more dated now.

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.

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.

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.

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.

Thanks
  #2  
Old August 14th, 2008, 10:25 AM
Fredrik Lundh
Guest
 
Posts: n/a
Default Re: Tkinter updates - Easiest way to install/use Tile?

Eric Brunel wrote:
Quote:
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.
And putting on my GSoC hat, I'd agree.

I'll probably prepare a "ttk patch kit" for Python 2.5 when things
settle down a bit (unless someone beats me to it), but if you want
something asap, 2.6 + ttk is what you want.

(the OP mentioned py2exe, so I'm assuming Windows here. building a
custom _tkinter for 2.5 with Tcl/Tk 8.5 on a Unixoid system is pretty
straightforward.)

</F>

  #3  
Old August 14th, 2008, 04:15 PM
Guilherme Polo
Guest
 
Posts: n/a
Default Re: Tkinter updates - Easiest way to install/use Tile?

On Wed, Aug 13, 2008 at 2:10 PM, Mudcat <mnations@gmail.comwrote:
Quote:
So I haven't programmed much in Python the past couple of years and
have been catching up the last few days by reading the boards. I'll be
making commercial Python applications again and wanted to see what's
new in the Gui department.
>
I started using Tkinter several years ago and have a lot of stuff
written in it. As a result, it's hard to switch to another interface
(wxPython, PyQt, etc) with all the hours it would take to reproduce
code I will re-use. (I mention this to avoid the inevitable post
asking why I'm still using it). While I was able to produce some nice
applications in the past and am comfortable with the functionality I
was able to achieve I still wanted to find a way to improve the look
since the old look is even more dated now.
>
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.
>
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.
>
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.
The other points were answered already, so let me give some more
insight on this last one.

For Windows there is a .zip you can download (following the links at
http://tktable.sourceforge.net/tile/) which requires no installation,
just unpacking. For Linux there is a package named tk-tile in Ubuntu.

In case you are using Windows, just unpacking the .zip doesn't
guarantee that Tk will find the tile package (unless you unpack at
whatever places Tk looks by default). If Tk doesn't find it, you need
to set the TILE_LIBRARY environment variable to whatever place tile
was unzipped to. I'm assuming you will be using the previously
mentioned ttk wrapper, which will look at TILE_LIBRARY, if necessary,
to load tile.
Quote:
>
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.
>
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
>


--
-- Guilherme H. Polo Goncalves
  #4  
Old August 14th, 2008, 11:05 PM
Guilherme Polo
Guest
 
Posts: n/a
Default Re: Tkinter updates - Easiest way to install/use Tile?

On Thu, Aug 14, 2008 at 12:05 PM, Guilherme Polo <ggpolo@gmail.comwrote:
Quote:
On Wed, Aug 13, 2008 at 2:10 PM, Mudcat <mnations@gmail.comwrote:
Quote:
>So I haven't programmed much in Python the past couple of years and
>have been catching up the last few days by reading the boards. I'll be
>making commercial Python applications again and wanted to see what's
>new in the Gui department.
>>
>I started using Tkinter several years ago and have a lot of stuff
>written in it. As a result, it's hard to switch to another interface
>(wxPython, PyQt, etc) with all the hours it would take to reproduce
>code I will re-use. (I mention this to avoid the inevitable post
>asking why I'm still using it). While I was able to produce some nice
>applications in the past and am comfortable with the functionality I
>was able to achieve I still wanted to find a way to improve the look
>since the old look is even more dated now.
>>
>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.
>>
>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.
>>
>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.
>
The other points were answered already, so let me give some more
insight on this last one.
>
For Windows there is a .zip you can download (following the links at
http://tktable.sourceforge.net/tile/) which requires no installation,
just unpacking. For Linux there is a package named tk-tile in Ubuntu.
>
In case you are using Windows, just unpacking the .zip doesn't
guarantee that Tk will find the tile package (unless you unpack at
whatever places Tk looks by default). If Tk doesn't find it, you need
to set the TILE_LIBRARY environment variable to whatever place tile
was unzipped to. I'm assuming you will be using the previously
mentioned ttk wrapper, which will look at TILE_LIBRARY, if necessary,
to load tile.
>
I have put this and some other info at
http://tkinter.unpythonic.net/wiki/tk85_and_python now.
Quote:
Quote:
>>
>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.
>>
>Thanks
>--
>http://mail.python.org/mailman/listinfo/python-list
>>


--
-- Guilherme H. Polo Goncalves
  #5  
Old August 15th, 2008, 03:05 PM
Mudcat
Guest
 
Posts: n/a
Default Re: Tkinter updates - Easiest way to install/use Tile?

Thanks for all the input! I was able to install 2.6 with the wrapper
file and get up and running quickly.

I like this. I can pass the style object to a separate stylesheet file
where I can create all the definitions. That cleans up a lot of
clutter around the gui widgets. In the past there just didn't seem to
be a good way to create clean code when it came to Tkinter guis
because of all the definitions with each widget creation. Now most of
that can be offloaded somewhere else.

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles