beginners choice: wx or tk?
invalid at invalid.invalid
Mon Jul 13 16:42:43 CEST 2015
On 2015-07-11, Chris Angelico <rosuav at gmail.com> wrote:
> On Sat, Jul 11, 2015 at 7:28 PM, Ulli Horlacher
><framstag at rus.uni-stuttgart.de> wrote:
>> I want to start a project with python.
>> The program must have a (simple) GUI and must run on Linux and Windows.
>> The last one as standalone executable, created with pyinstaller.
> Not sure what your advantage is with pyinstaller, it adds a level of
> complication that doesn't usually justify itself IMO.
>> I have already an implementation in perl/tk :
>> I am not really happy with tk, because it has some bugs, at least its
>> perl integration. I have never used wx.
IMO, tk is quite a bit easier to use than wx for simple apps.
>> What is the recommendation for a python beginner: wx or tk?
> Using wxPython means you need another library, while tkinter comes
> with Python.
Tkinter _usually_ comes with Python. You may run into Linux/Unix
installs that have Python without tk.
> There are some limitations to tk, and I personally don't like its
> style, but if you're wanting to package it up into an EXE, every
> third-party library you add will increase the size of that EXE,
> potentially quite significantly (wxPython will drag in everything
> that it depends on, which IIRC is quite a bit).
Interesting. My experience was opposite. When I used to use py2exe,
wx bundles tended to be smaller installs that tkinter apps (at least
for small, simple apps). It doesn't matter whether the library is
"third party" or not when bundling up a windows app. All that matters
is the size of the library. When I compared sizes of farily simple
apps, tkinter apps were quite a bit larger than wx apps. Don't forget
that tkinter pulls in a complete TCL implementation.
> There are other choices, too - pygtk/pygobject (GTK) and pyqt (Qt)
> come to mind - is there a particular reason you're limiting the
> question to just wx vs tk?
The last time I checked pygtk on Windows wasn't ready for the real
world, but that was a year or two back. That said, I think pygtk feels
like a much cleaner and more pythonesque API than wx.
> Personally, I quite like GTK, but I don't have much experience with
> either of the Python bindings. Never used wxPython or PyQt.
If it didn't have to run on Windows, I'd pick pygtk over wx. I've
never tried qt.
Grant Edwards grant.b.edwards Yow! Pardon me, but do you
at know what it means to be
gmail.com TRULY ONE with your BOOTH!
More information about the Python-list