beginners choice: wx or tk?

Chris Angelico rosuav at gmail.com
Tue Jul 14 19:43:08 CEST 2015


On Wed, Jul 15, 2015 at 3:28 AM, Grant Edwards <invalid at invalid.invalid> wrote:
> 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.

Well, let's look at three straight-forward options:

1) Python program uses tkinter
2) Python program uses wxPython
3) Python program uses PyGTK
4) (optionally) Python program uses PyGObject

Then you package your script up with all of its dependencies - Python
interpreter, GUI toolkit, and everything that they depend on - and see
how big it is. That's the comparison that matters; everything else is
implementation detail.

I had been under the impression that tkinter + Tcl + Tk + etc etc etc
was smaller than wxPython + wxWidgets + etc etc etc, but it's entirely
possible I'm flat wrong on that. It doesn't matter how Python is
normally shipped, it matters how big it's going to be when you make
that single-executable package.

But I still think it's better to *not* do that, because you bind your
deps to your code release cycle. If you make this kind of package,
most people won't know how to unwrap it and get the Python scripts out
of it, so the only thing they can do is upgrade to the latest release
that you've made. So when Python 2.7.11 comes out, maybe with some
crucial security patch that an end user needs, s/he has to wait for
you to make a new package that incorporates the latest Python. If you
ship just the .py files, you're responsible for your own code and
nothing else.

ChrisA


More information about the Python-list mailing list