Making wxPython a standard module?
bronger at physik.rwth-aachen.de
Sat Jun 14 23:14:10 CEST 2008
Grant Edwards writes:
> IMO, a few of the "un-Pythonic" things about wxPython are:
> 1) Window ID numbers.
When I started to use wxPython, there was a newly-introduced
wx.ID_ANY that you could give instead of -1. My eyes filtered it
out after a couple of hours, just as they do with "self".
> 2) the "flags" parameter.
Well, I like flags, and I don't see that they are unpythonic. I
find the code they produce very legible.
> 3) the parent/child tree
> 4) sizers
Maybe because I come from TeX/LaTeX, i liked sizers immediately.
They worked well for me.
> 5) binding
> "What? you wanted a button that _did_ something when you
> clicked it?"
You're right, this can be better. There's too much explicitness.
However, if you really hate the construct, you can define a
> 6) Thousands of wx.UPPER_CASE_INTEGER_HEX_CONSTANTS
Thank you for the thorough explanations but in my opinion your
points are minor. Additionally, most of them are a matter of taste.
I don't think that because you didn't find sizers convenient, or
some parts too explicit, you can say that wxWidgets is un-Pythonic.
I rather have the impression that you like terseness, which is
totally okay but a different thing.
I agree that changing the naming conventions and making use of
properties would increase pythonicness, but on an already high
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: torsten.bronger at jabber.rwth-aachen.de
More information about the Python-list