[Code Challenge] WxPython versus Tkinter.

B

Bryan

Go on...


A year and a half and you are still producing buggy code? (you
yourself admitted this!)

Of course! You'll not find a single programmer who creates bug-free
code.

(I'm beginning to think we're dealing with a software-based troll
programmed to focus in on specific words in order to set up strawman
arguments)
Well could we see a link to a few answered questions or get your nick
so we can corroborate this statement ourselves?

Sure! I don't feel compelled to answer your demands but this one is
harmless enough.

http://stackoverflow.com/users/7432/bryan-oakley

if you want, you can also do a search on google groups for my other
email address "(e-mail address removed)". I have a history in
comp.lang.tcl that goes back to almost the dawn of time. I'm the 8th
most prolific poster (and pretty much all answers, very few
questions), though I'd be higher except I used a different email for a
year or so back in 2002-2004

http://groups.google.com/group/comp.lang.tcl/about
First rule when given a challenge you cannot answer due to ignorance:
question the validity of the challenge.

And the first rule for dealing with someone who gives facts that don't
agree with you is to call them names.
Well this is ONLY the first challenge Bryan. More will come. However,
not until someone has the balls to answer my first challenge.

Honestly, your challenge is childish. The rules are self-serving and
the outcome proves nothing. Your challenge serves nothing but to prove
wxPython has a built-in widget that tkinter does not. Nobody disputes
that. Proving it in code is pointless when it's a well known,
documented fact.
I don't think that is completely accurate Bryan. Harder thanTkinter,
yes. Anything else is hyperbole.


Answer my challenge first, then we talk. And obviously you do not
understand the power of wx's Open Graphics Library (OGL). You'd better
go check that out before you stick yourTkinterloving foot into your
big mouth.

I stand corrected. It was early, that was the first thing that came to
mind. said:
...

Segfault or not wx is superior.

I don't know if you realize it, but that's a funny statement.
BULLSHITE!

No, seriously. Tcl/tk and python/tkinter are both remarkably stable in
this regard. You want a programming challenge? Try creating an app
using either of those combinations to get a segfault. I'm not saying
it can't be done, but it _is_ challenging.
...
LIAR! LIAR! PANTS ON FIRE!

Ok, now I'm pretty certain I'm responding to a bot. Time to move on.
 
R

rantingrick

[...snip: good discussion...]
Rather, I believe
those pushing accessibility should concentrate on the root cause; that
of fixing TKInter, and not forcing everyone else to use a different library.

Now you go too far!

And this is an ironic position from someone who supports the stdlib
GUI that IS forced on us by default. Sure you can choose a different
library, but in the case of a user (and accessibility is a big USER
concern when that user is handicapped!) the library is already chosen
(Tkinter:which does not support accessibility) by the developer . I
can also argue that Tkinter's inclusion in the stdlib is proliferating
non-compliance with accessibility. I'll bet you would not park in a
handicap spot however you support a GUI library that ignores handicap
people? IRONIC!
I believe that the approach is the main key here, and I have had this
argument many times. If I wrote an app, and someone said something along
the lines of "you need to change a core library because it doesn't work
with this program," my first response would be who the hell are you to
say what I need to use?

Well these people you are chastising are disabled people. Who the hell
are YOU to be high and mighty about it? I guess these "disabled"
people get what they deserve huh! Maybe we should just do the world a
favor and exterminate them like the Nazis? That way we don't have to
cater to their selfish needs!
We need to take the approach of "This is what is
wrong, this is why, this is possibly how it could be fixed. Would you be
willing to do so?"

WE ALL NEED TO TAKE THAT APPROACH TYLER, INCLUDING YOURSELF!!!
So, with all of this said, TKInter -is- unaccesssible for us. My
arguments have not been for or against one or the other in this thread,
but more to get RR to make a better point.

Yea, and i just made it.
Because eventually, WX would
benafit those using a screen reader a lot more than say, TKInter will.
That doesn't mean that I'm saying that we need to make it a part of the
stdlib as of yesterday, because segfaults from someone with 10+ years of
experience (multiple people, actually) says a lot, whether or not RR
wants to acknowledge said facts. I can not with good conchence say that
the switch should be done just for accessibility purposes.

No one said accessibility was the only argument. However it IS very
important in todays time. We are not living in the dark ages, much
less under Hitlers rule! If a GUI library has refused to recognize
accessibility concerns a decade into the 21st century, just how long
must we wait Tyler? HOW LONG?
Obviously it
would be awesome, but I think Octavian is just focusing on himself, and
not the actual big picture here.

<sarcasum> Yes Octavian is the only disabled person in the world. What
a selfish, selfish person he is. Shame on you Octavian, Shame on You!
</sarcasum>

You just showed your true colors Tyler, very sad. :(
 
B

Bryan

Bryan, on the other hand, has been aTkinterluminary who has helped
me in the past when I was learningTkinterand I won't be too
surprised if he helps me again. I'm sorry he's had so much trouble
with wx though.

Thanks for the kind words, I appreciate it.

I'm puzzled by the problems I have with wxPython, too. It's taken me
longer to get a grasp on some concepts that I would have guessed. The
first time I got a segfault I was stunned but shrugged it off. A
segfault in a scripting language? Blasphemy! Now I'm not so stunned
anymore, but I still shrug them off. Part of the blame certainly rests
on my shoulder. With only a year and a half or so under my belt with
wxPython there's still lots I have to learn and the documentation only
gets me so far. What's the rule of thumb -- it takes 10 years to
become an expert on a subject?

The underlying architecture of tk is so solid, so well designed (IMHO)
that you (well, I) take a lot of stuff for granted. Then you switch to
something like wxPython where the foundation is maybe a little shaky
in exchange for a much richer library of widgets, and the transition
is bound to be bumpy. It's not generally a matter of "better" or
"worse", just "different".

The key to success is to realize both of the toolkits are just that --
toolkits. They aren't religion, they aren't an assault on family
values or a threat to national security. They are tools to get the job
done. Instead of saying "mine is better than yours" it's better to
learn the strengths and weaknesses of both (or all) and pick the right
one for the job. Attempting to prove that any of these toolkits is
"best" is tilting at windmills.

Personally, I think tkinter is the right choice as a built-in toolkit
but I'll admit to bias. The basics are really simple, and for 90% of
the stuff you're going to code in a scripting language it has all the
features you need. If you specifically need something like the
styledtextctrl or grid of wxPython, or maybe you're concerned with
accessibility or some feature that's not built in to tkinter, by all
means switch to a different toolkit. That's the beauty of these GUI
toolkits -- you can keep the language you love (python, in the case of
this newsgroup) yet pick the GUI toolkit that best helps you solve the
problem at hand.

Instead of fighting over the differences, raise a pint in celebration
of their diversity. :)
 
M

Mark Roseman

Littlefield said:
Rather, I believe
those pushing accessibility should concentrate on the root cause; that
of fixing TKInter, and not forcing everyone else to use a different library.


Here, here. From my queries to some of the Tcl/Tk folks, it seems that
while the knowledge and expertise is not present in the core developer
community, they would be more than happy to help people who do have some
knowledge in this area so that Tk could be made to be more accessible.

Grand conspiracies aside, I think the development communities behind
most GUI toolkits would be very receptive to people who could help make
developing accessible applications with their toolkits feasible.

(And if/when this does get done for Tk, I promise at least to make sure
that the tutorial at http:///www.tkdocs.com covers this topic).

Mark
 
B

Bryan

Thats another uninformed statement by you we can add to the mountains
of useless cruft you have offered so far. Unicode IS
internationalization and Guido thought it was SO important that
Python3000 auto converts all strings to Unicode strings. Obviously he
is moving us toward full Unicode only in the future (AS SHOULD ALL
IMPLEMENTATIONS!). We need one and only one obvious way to do it. And
Unicode is that way.

Ok, great. You've identified one programmer who thinks about
internationalization. Not much of a compelling argument there.

However, I think you missed my point. My point wasn't that people like
Guido don't think of these topics. It's that the people in the
trenches who use these tools don't think about these topics. How many
of your co-workers actively think about internationalization and
accessibility? I'm guessing none, but maybe you're lucking and work in
a particularly enlightened team. I've perhaps worked closely with a
few hundred programmers in my career, and very few of them thought of
these subjects. In my experience it's just not something the
programmer in the trenches thinks about. That is the point I was
trying to make.
 
M

MRAB

Thats another uninformed statement by you we can add to the mountains
of useless cruft you have offered so far. Unicode IS
internationalization and Guido thought it was SO important that
Python3000 auto converts all strings to Unicode strings. Obviously he
is moving us toward full Unicode only in the future (AS SHOULD ALL
IMPLEMENTATIONS!). We need one and only one obvious way to do it. And
Unicode is that way.
There's more to internationalization than just Unicode. There's the
ability to handle messages in various languages which have a different
syntax and grammar.

There's an interesting Perl-oriented article on it here:

http://search.cpan.org/dist/Locale-...lization_Horror_Story:_It_Could_Happen_To_You
 
B

Bryan

Bryan: Here's a pretty good list for you.
Windows:
Jaws for Windows (http://freedomscientific.com). Not free, but you get a
40 minute demo before you need to reboot.
Nonvisual Desktop Access:http://www.nvda-project.org/
Free, open source, written in python (with some core stuff in c/c++).
Linux:
Orca live.gnome.org/Orca
Fre, open source. If you don't want to install that bloated mess on a
box (I sympathise), and you can grab a vmware vinux or a live cd or
whatever from:http://vinux.org.uk
OSX:
OSX comes built in with Voiceover, just hold down the command key and
hit F5. Use the same keystroke to turn it off.
Enjoy!

Thanks! I appreciate it.
 
L

Littlefield, Tyler

RR,
I do hate to break the news to you, but I am -blind-, which is why I am
using a screen reader. So I'm not parking anywhere--the DMV refuses to
give me a license for some odd reason. What was that post about IQ you
made earlier?...
 
E

Emile van Sebille

Bryan you are clearly an idiot. I am demanding that from now on, you
must have at least a 120 or higher IQ before participating in any of
my threads.

Rantingrick thinks certain threads belong to him.

'nuf said.
[/QUOTE]


Can we reopen the python-gui list? That'd be the appropriate place to
hammer together a PEP to replace tkinter in the standard library.

Emile
 
M

MRAB

[...snip: good discussion...]
Rather, I believe
those pushing accessibility should concentrate on the root cause; that
of fixing TKInter, and not forcing everyone else to use a different library.

Now you go too far!

And this is an ironic position from someone who supports the stdlib
GUI that IS forced on us by default. Sure you can choose a different
library, but in the case of a user (and accessibility is a big USER
concern when that user is handicapped!) the library is already chosen
(Tkinter:which does not support accessibility) by the developer . I
can also argue that Tkinter's inclusion in the stdlib is proliferating
non-compliance with accessibility. I'll bet you would not park in a
handicap spot however you support a GUI library that ignores handicap
people? IRONIC!
I believe that the approach is the main key here, and I have had this
argument many times. If I wrote an app, and someone said something along
the lines of "you need to change a core library because it doesn't work
with this program," my first response would be who the hell are you to
say what I need to use?

Well these people you are chastising are disabled people. Who the hell
are YOU to be high and mighty about it? I guess these "disabled"
people get what they deserve huh! Maybe we should just do the world a
favor and exterminate them like the Nazis? That way we don't have to
cater to their selfish needs!
[snip]
I'd like to invoke Godwin's law at this point.
 
R

Robin Dunn

Still crashes the interpreter.

The crash on Linux is due to SetSingleStyle removing the all items and
the columns when the mode of the listctrl is changed, and then the
code continues on with the assumption that the columns still exist and
the crash happens when an item is added to column zero and there is no
column zero. Apparently the native widget on Windows doesn't have
that limitation. BTW, if the linux wx packages had the runtime
assertions turned on then you would have seen a Python exception with
some clues that would probably help solve the problem. I don't know
about others but on Ubuntu you can install the *wx*-dbg packages to
get a version with the assertions turned on. Hopefully that will
change starting with 2.9 as wx now turns on the assertions by default
for builds configured normally, and the wx-dev team recommends that
the assertions are not turned off, except in rare circumstances.

BTW, on behalf of the wxPython community I'd like to apologize for the
havoc caused by the flaming troll escaping from his cage. In general
wxPython users are much less militant and zealotty and honor
everyone's freedom to choose which ever UI tool kit works the best for
their own needs.

--Robin
 
O

Octavian Rasnita

From: "Ethan Furman said:
[...]

Octavian,

Please do not repost rr's crap in its entirety, or you'll find yourself
added to many killfiles -- just like he is.



:)
I am not posting anyone's crap. I just informed why Tkinter is bad.
And I also don't say that WxPython is ideal, but just that it has some very important features that Tk doesn't offer.

Octavian
 
R

rantingrick

[snip]
I'd like to invoke Godwin's law at this point.

Actually no. And i'll give good reason.

Tyler's argument, which lacked greatly in compassion for people with
disabilities brought out my accusation. It was not an accusation meant
to merely insult just to invoke a flame war; which is the definition
of Godwins Law.

It is a fact that Tyler displayed despicable intolerance for people
who have disabilities and such a correlation to totalitarian regimes
was not only the correct response but in fact the only response to
such veiled hate speech. We cannot allow such displays to slip by
unchallenged by this community. And hopefully Tyler will see the
unjust position he has taken and beg for forgiveness.
 
R

rantingrick

The crash on Linux is due to SetSingleStyle removing the all items and
the columns when the mode of the listctrl is changed, and then the
code continues on with the assumption that the columns still exist and
the crash happens when an item is added to column zero and there is no
column zero.  Apparently the native widget on Windows doesn't have
that limitation.  BTW, if the linux wx packages had the runtime
assertions turned on then you would have seen a Python exception with
some clues that would probably help solve the problem.

In your face Linux users! Learn how to debug already!
BTW, on behalf of the wxPython community I'd like to apologize for the
havoc caused by the flaming troll escaping from his cage.  In general
wxPython users are much less militant and zealotty and honor
everyone's freedom to choose which ever UI tool kit works the best for
their own needs.

Well we forgive Byran, but we will not forget! :)
 
O

Octavian Rasnita

From: "Mark Roseman said:
Octavian, thank you for very clearly making and repeating your point
about screen readers. It is very obvious that at this point in time Tk
(and hence Tkinter) is not a suitable candidate if screen readers are an
important concern.


The screen readers are always an important concern if the GUI is used in a program that could be interesting for those who need a screen reader.
Of course that if that program is Corel Draw or Photoshop or a video-editing application it is not important to offer accessibility for screen readers, but most of the programs are not that kind of apps.
In an ideal world, every GUI would be fully accessible. The reality is
that sometimes, competing requirements will lead to accessibility being
lower in the priority list than other things. So with different
requirements and priorities, the "best" solution will be different.


Yes of course I agree with this. But if... let's say Python would promote a better GUI than Tkinter, most Python programmers would probably start to learn to use that GUI, and they would be able to use it better than other GUIS, and the competing requirements might force them to use that GUI because they will be able to code the GUI easier with it and so on.
And if something doesn't work in that GUI, (segfaults for example) more and more programmers might become interested to solve those bugs in order to have a better GUI, and finally it would be much better than now, and... for more people.

I don't object and in fact commend you for advocating for accessibility.
I do feel you are not acknowledging and fully respecting that others may
be in situations where accessibility may not be the primary concern.


I think that the accessibility shouldn't be a concern at all, because I think it is too much to ask for such a thing from the programmers.
The applications should be accessible by default, by just using the right GUI which offer the necessary accessibility features.
Well yes, if some fields are not labeled or some images don't have a text associated with them... if somebody is interested he/she could ask those features added later and it would be very simple to add them, but if the program is made with Tkinter... then nothing could be made to improve the accessibility.

Let's imagine that Python doesn't offer any GUI lib and that no Python programmer knows to use a GUI lib.
What would the majority of Python programmer choose if Python would start to offer support for WxPython and Tkinter and WxPython would be packaged in the default distribution?

I think that the preference for Tk is because it is old and there are very many programmers that know to use it very well because these days the size of a program is not important.

I have also heard that there is no enough support for WxPython in order to maintain it very well. This is a problem indeed and if it is true it can be a valid reason why WxPython is not considered, but WxPython is pretty well maintained. Aren't the WxPython developers willing to continue to maintain it if it will be added to Python distribution?

Octavian
 
R

rantingrick

Ok, great. You've identified one programmer who thinks about
internationalization. Not much of a compelling argument there.

Oh Bryan your view so simplistic. There is a whole world out there you
know.
However, I think you missed my point. My point wasn't that people like
Guido don't think of these topics. It's that the people in the
trenches who use these tools don't think about these topics. How many
of your co-workers actively think about internationalization and
accessibility?

No, you've missed the point AGAIN!

It doesn't matter what the developers "think" about accessibility. It
matters what they "DO" about it. Most people in YOUR organization
don't consider accessibility because accessibility does not concern
them . Just like people who dump toxic chemicals into your drinking
water don't concern themselves when you get cancer. They don't care
because they are unaffected. SELFISHNESS is the key word here!

These people have 20/20 vision, perfect hearing, and all their
extremities still attached. Sadly however they lack a brain that can
comprehend even the most basic form of compassion for those who don't
have these luxuries! If ANY of these selfish idiots was in a car
accident and lost an arm and both eyes, i'd bet a million dollars that
the next time they sit down to use a computer they will realize just
how important accessibility is. I would bet that accessibility would
become a major buzz word around your office then!
I'm guessing none, but maybe you're lucking and work in
a particularly enlightened team. I've perhaps worked closely with a
few hundred programmers in my career, and very few of them thought of
these subjects. In my experience it's just not something the
programmer in the trenches thinks about. That is the point I was
trying to make.

Yes and you made your selfishness quite clear! Be careful my friend,
because as Tyler found out, this mindset becomes a slippery slope
*very* quickly!
 
O

Octavian Rasnita

From: "Littlefield said:
Hello,

I have been on another list with Octavian, and he takes his
accessibility a bit to seriously. If things went his way, he wants laws
where -everything- has to be accessible, and it is illegal not to do so.


Is the discrimination legal in your country?
If you create a program only for a part of the population knowing very well that you do that, without having technical issues, (because as you know, there are very well known technical solutions for it), it means that you discriminate a part of the population.

Of course, as I explained, if you want to create a drawing program or a video-editing application, there are technical issues that don't allow you to offer that program to everyone, so it is not your fault at all in that case.

As a sidenote, I would like to preface everything I'm going to say by
mentioning the fact that I have been using a screen reader for many
years, so I understand some of where he is coming from.

I think my goal, (and I differ from Octavian here), is to try to find
fixes for things, rather than saying "this sucks, it does not work with
a reader, and thus it shouldn't be used). Having done a lot of
development work in the past, I can't say "hey you, I want you to make
this app accessible, and because you used TKInter it's not, so use
something else, but nothing that isn't accessible." Rather, I believe
those pushing accessibility should concentrate on the root cause; that
of fixing TKInter, and not forcing everyone else to use a different library.

This is like saying that those who need a screen reader should better find a solution for their health problems and after they will find it, they won't need a screen reader.
From the accessibility perspective there are already accessible interfaces so that's solved and it just need to be used.
Making Tkinter would be great, but it would not be a solution if it won't be used after it will be accessible.

If Tk would be made accessible but Python would start including a QT GUI or another one that wouldn't be accessible and the programmers would start using that GUI, the result is that the apps won't be accessible.

If there is a solution now for this problem, and not in a bad GUI lib that doesn't many features, but one which is very fast and full of widgets, then that solution should be promoted by Python.
I don't say (as you pretend) that all the programmers should be forced to use it or at least to prefer it.
I said that it should be promoted because it is the right tool.

I think that the political corectness term was invented in USA...

I believe that the approach is the main key here, and I have had this
argument many times. If I wrote an app, and someone said something along
the lines of "you need to change a core library because it doesn't work
with this program," my first response would be who the hell are you to
say what I need to use? We need to take the approach of "This is what is
wrong, this is why, this is possibly how it could be fixed. Would you be
willing to do so?"


With other words, you are very happy when you can't use a program because it is not accessible, thinking that as a programmer you won't be forced by someone else or laws to learn to use the right tool.
Or you may be willing to change all the programs in the world which are not accessible because they use a bad GUI.

So, with all of this said, TKInter -is- unaccesssible for us. My
arguments have not been for or against one or the other in this thread,
but more to get RR to make a better point. Because eventually, WX would
benafit those using a screen reader a lot more than say, TKInter will.
That doesn't mean that I'm saying that we need to make it a part of the
stdlib as of yesterday, because segfaults from someone with 10+ years of
experience (multiple people, actually) says a lot, whether or not RR
wants to acknowledge said facts.

Those segfaults would disappear much faster if WxPython would become more interesting and if it would become a part of Python distribution because there would be much more programmers interested about it and willing to solve its problems under some platforms.

WxPython has some problems under some platforms used by a minority of users. Tkinter has some problems for another minority of users.
The big picture is the worst thing possible and it is not that I can't see it, but I can't agree with it. The big picture is that very many people simply don't care and this is not something good.

Octavian
 
O

Octavian Rasnita

From: "rantingrick said:
Obviously it
would be awesome, but I think Octavian is just focusing on himself, and
not the actual big picture here.

<sarcasum> Yes Octavian is the only disabled person in the world. What
a selfish, selfish person he is. Shame on you Octavian, Shame on You!
</sarcasum>

You just showed your true colors Tyler, very sad. :(


I understand Tyler because I know some blind people.
It is very frustrating to be able to think better than many other sighted people and to be able to do very many complex things, but to not be able to do very basic things while they can do them very easy.
Because of this, many blind people try to show that they are like the sighted, that they can do everything, that they are independent, so they like to talk about the movies they watch, they like to have touch-pad mobile phones and so on, even though the accessibility of those gadgets is really low.

I don't speak from the perspective of a programmer because a programmer, even a blind one, can create the program he wants, to be accessible of course, but I speak from the perspective of the users because they are not programmers, they can't do anything to improve the accessibility of the programs that other people can use very easy.

And what's worst is that most of those inaccessible programs are not that way because the programmer that created them consciously chosen the GUI lib because of who know what specific reasons, competitive or of other kind. Most of the time the programmer uses the GUI lib that she/he knows better and think that would be easier to create the program with. Most of them don't even know about accessibility, there are very many programmers in some countries that don't even imagine that some people can use a computer with a screen reader.
Octavian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top