tcl/tk vs. python/Tkinter - Example attached

richard_chamberlain richard_chamberlain at ntlworld.com
Wed Jun 14 12:52:26 EDT 2000


Hi Daniel,

What platform are you working on?

On my win98 machine I don't see any difference in speed (except python
starts up very slightly slower).

Other than that the readability of the python is the real clincher.

Richard
Daniel Kramer <daniel at visionart.com> wrote in message
news:3946B170.17A2630 at visionart.com...
>
> I have just started to use python this last week.. I wanted to port a
> tcl/tk app to it and see how I like working with it.  As far as
> programming with it I like it more.. but just as I got started on my app
> I noticed some speed differences in TK.  The tcl/tk app is much more
> responsive then the python/Tkinter app.
>
> I have put together a simple example done both ways.. it's attached to
> this mail.
>
> Within the tar you will find:
>
> canvas.tcl - This is just a simple tcl/tk prog.. 2 rectangles are added
> to a canvas and you can move them around with the mouse.
>
> canvas.py - This is the same thing written in python/Tkinter.
> nodeUI.py - This contains most of the classes/functions to drive the
> canvas.py.. it should be in the same dir as canvas.py
>
>
> Since I am new to this lang I was just wondering if there was a way to
> get better python/TK performance... if anyone could try out the examples
> and let me know.. for me the tcl/tk one feels much more responsive but I
> don't have any hard numbers to prove that.
>
> I have been reading that wxWindows is the much faster solution.. but I
> am very familiar with TK and it's plenty fast for what I need.. but I
> worry that the Tkinter ver won't be fast enough once I add alot more to
> it.
>
>
> -Daniel
>
>
>


----------------------------------------------------------------------------
----


>
>
> --
> --------------------------------------------------------------------------
---
> Daniel Kramer
> http://www.visionart.com/~daniel/
> daniel at visionart.com:           VisionArt Design and Animation
>
>
>





More information about the Python-list mailing list