beginners choice: wx or tk?

Grant Edwards invalid at invalid.invalid
Tue Jul 14 19:28:06 CEST 2015


On 2015-07-14, Mark Lawrence <breamoreboy at yahoo.co.uk> wrote:
> On 14/07/2015 16:21, Michael Torrie wrote:

>>> Why would you have to ship "extra" libraries for Windows?  Extra
>>> compared to what?  When I compared bundled apps for Windows using wx
>>> and Tk, you had to ship more libraries using Tk than you did with wx.
>>> Maybe that's changed...
>>
>> You make a good point.  Although Tk is considered part of the standard
>> Python library (though optional), Tk not only requires some dlls, it
>> also embeds the tcl language interpreter as well.  So by some measures,
>> Tk in Python is pretty heavy, though I have no idea what the size it
>> would add to an application bundle actually is.  I've always thought it
>> was a bit crazy how when you use Tk, you're actually using the Tcl
>> language as well, even though you're driving it all from Python.  I
>> believe there were attempts to separate Tk from Tcl, and allow Perl/Tk
>> to replace all the Tcl code with Perl code.
>
> Surely if Tk is optional

It is.

> then IDLE is also optional,

It is.

> as IDLE depends on Tk?  But I thought that IDLE was always supplied
> with Python,

That depends on who supplied the Python.  Most/all of the ready-made
Windows builds include Tk, but there's no reason you can't build it
without Tk not install IDLE. 

But, you can't assume that all Windows machines have _any_ Python
build installed.

> so am I missing something, or am I simply plain wrong, or what?

My point is that on Windows, _Python_ is optional.  If you want to
ship a stand-alone .exe file, then you've got to ship both Python andT
Tcl/Tk or ship both Python and wx.  In my experience (which was a
couple years ago), Windows wx libs were smaller than Windows Tcl+Tk
libs.  wx on Windows uses native widgets.  Tcl/Tk doesn't: it includes
not only the Tcl language implementation, it also includes low-level
pixel-twiddling implementations of all the widgets.

Comparing the size of Tcl+Tk and wx/Gtk doesn't really make sense
either since we're talking about MS Windows targets.  Gtk isn't
involved.  wxWindows on MS Windows runs on top of native widgets, not
on top of Gtk.

-- 
Grant Edwards               grant.b.edwards        Yow! VICARIOUSLY experience
                                  at               some reason to LIVE!!
                              gmail.com            


More information about the Python-list mailing list