Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > [Code Challenge] WxPython versus Tkinter.

Reply
Thread Tools

[Code Challenge] WxPython versus Tkinter.

 
 
rantingrick
Guest
Posts: n/a
 
      01-23-2011

WxPython versus Tkinter (A code battle to the death!)

by Rick Johnson.

I have in many threads declared that Tkinter (and TclTk) is currently
--and has been for a decade-- the wrong choice for Python's stdlib
GUI. Throughout the 90's Tkinter was fine. However we have been in the
21st century for more than a decade and Tkinter is no longer relevant.
Many people have argued (weakly) that Tkinter is still valid. However
their arguments have been mostly baseless opinions that sadly lack
vision for the future.

In this thread i intend to slay my enemies with cold hard facts based
on code. It is time to put your code where your mouth is (or you
foot). This will be an open challenge to *anyone* in this community,
in the world, and *even* the great Guido van Rossum himself! It is now
time for you (python community) to prove the worth of Tkinter or
accept its demise at my hands!

Some of you may think this sounds like an impossible challenge. How
can one man defend his position against the entire world! Yes, it
would seem impossible for one man to face an entire community in open
challenge! And in most cases only a fool would challenge the world.
However, i have not one ounce of fear within me while facing these
odds because my position is the correct position. My position is based
on facts and NOT friendship, truth and NOT tantrums, and finally
vision NOT vengance! I am on the correct side of history!

It is time to prove once and for all how dated and worthless Tkinter
is compared to wxPython. Yes, WxPython is not as advanced as i would
like it to be for a 21st century GUI library. However compared to
Tkinter, Wx is light years ahead! Wx is our best hope to move Python
into the 21st century.

So now is the time for all you naysayers, trolls, and minions to face
me in mortal combat within the arena of truth and righteousness. Ready
your minds and wield your text editors for we shall battle for the
glory of Python! And when i have slayed the fools with their own
foolishness then ye all shall be enlightened!

So PUT UP OR SHUT THE HELL UP!


---------------------------------------
Challenge 1: (Simple Directory Viewer)
---------------------------------------

Create a simple Directory Viewer GUI. You CANNOT use a treectrl! The
point of this challenge is to show that Tkinter has no support for a
true ListCtrl widget. However the Wx::ListCtrl is fully featured! For
wxPython the code is simply wielding a few built in classes. For
Tkinter no such ListCtrl functionality exists. You CAN create the
functionality yourself (and i know this because i HAVE created it!)
however it involves tons of work and still can't hold a candle to the
wx::ListCtrl

---------------
Requirements:
---------------

How the user navigates to a folder is not important but you must
display the list of files/folders in two view modes with icons;

1. Display files in both ReportView and ListView.

* Reportview:
...scrollable vertical list with three columns.

* Listview:
...scrollable horizontal-ly wrapping list.

Note: If you do not understand the view modes just run my code for an
example. But the user must be able to switch between these two modes
easily. How the switching is done is unimportant -- I simply used two
buttons.

2. Columns
* Minimum of three cols; Name, Size, and Type (reportview).
* the "Name" column must include an icon AND label (both views).
* columns must be sortable by the user (reportview).
* columns must be sizable by the user (reportview).

3. Items
* All must be editable in place (no popup editing allowed!).
* All items must be selectable/deselectable by user.
* All items must be delete-able by the user.

That is the challenge. Step forth and battle if you can!

-----------------
WxPython code:
-----------------

https://sites.google.com/site/thefut...ode-challenges


I await any challengers...



 
Reply With Quote
 
 
 
 
Terry Reedy
Guest
Posts: n/a
 
      01-23-2011
On 1/22/2011 7:07 PM, rantingrick wrote:

Near the beginning of this thread, I gently challenged you to produce a
concrete, practical proposal for an stdlib addition that could be
critiqued and improved. When you asked for problems with
wxwidgets/wxpython, I gave some. Still waiting.

> So PUT UP OR SHUT THE HELL UP!


--
Terry Jan Reedy

 
Reply With Quote
 
 
 
 
Octavian Rasnita
Guest
Posts: n/a
 
      01-23-2011
From: "rantingrick" <(E-Mail Removed)>
>
> WxPython versus Tkinter (A code battle to the death!)
>
> by Rick Johnson.
>
> I have in many threads declared that Tkinter (and TclTk) is currently
> --and has been for a decade-- the wrong choice for Python's stdlib
> GUI. Throughout the 90's Tkinter was fine. However we have been in the
> 21st century for more than a decade and Tkinter is no longer relevant.
> Many people have argued (weakly) that Tkinter is still valid. However
> their arguments have been mostly baseless opinions that sadly lack
> vision for the future.
>
> In this thread i intend to slay my enemies with cold hard facts based
> on code. It is time to put your code where your mouth is (or you
> foot). This will be an open challenge to *anyone* in this community,
> in the world, and *even* the great Guido van Rossum himself! It is now
> time for you (python community) to prove the worth of Tkinter or
> accept its demise at my hands!
>
> Some of you may think this sounds like an impossible challenge. How
> can one man defend his position against the entire world! Yes, it
> would seem impossible for one man to face an entire community in open
> challenge! And in most cases only a fool would challenge the world.
> However, i have not one ounce of fear within me while facing these
> odds because my position is the correct position. My position is based
> on facts and NOT friendship, truth and NOT tantrums, and finally
> vision NOT vengance! I am on the correct side of history!
>
> It is time to prove once and for all how dated and worthless Tkinter
> is compared to wxPython. Yes, WxPython is not as advanced as i would
> like it to be for a 21st century GUI library. However compared to
> Tkinter, Wx is light years ahead! Wx is our best hope to move Python
> into the 21st century.
>
> So now is the time for all you naysayers, trolls, and minions to face
> me in mortal combat within the arena of truth and righteousness. Ready
> your minds and wield your text editors for we shall battle for the
> glory of Python! And when i have slayed the fools with their own
> foolishness then ye all shall be enlightened!
>
> So PUT UP OR SHUT THE HELL UP!
>
>
> ---------------------------------------
> Challenge 1: (Simple Directory Viewer)
> ---------------------------------------
>
> Create a simple Directory Viewer GUI. You CANNOT use a treectrl! The
> point of this challenge is to show that Tkinter has no support for a
> true ListCtrl widget. However the Wx::ListCtrl is fully featured! For
> wxPython the code is simply wielding a few built in classes. For
> Tkinter no such ListCtrl functionality exists. You CAN create the
> functionality yourself (and i know this because i HAVE created it!)
> however it involves tons of work and still can't hold a candle to the
> wx::ListCtrl
>
> ---------------
> Requirements:
> ---------------
>
> How the user navigates to a folder is not important but you must
> display the list of files/folders in two view modes with icons;
>
> 1. Display files in both ReportView and ListView.
>
> * Reportview:
> ...scrollable vertical list with three columns.
>
> * Listview:
> ...scrollable horizontal-ly wrapping list.
>
> Note: If you do not understand the view modes just run my code for an
> example. But the user must be able to switch between these two modes
> easily. How the switching is done is unimportant -- I simply used two
> buttons.
>
> 2. Columns
> * Minimum of three cols; Name, Size, and Type (reportview).
> * the "Name" column must include an icon AND label (both views).
> * columns must be sortable by the user (reportview).
> * columns must be sizable by the user (reportview).
>
> 3. Items
> * All must be editable in place (no popup editing allowed!).
> * All items must be selectable/deselectable by user.
> * All items must be delete-able by the user.
>
> That is the challenge. Step forth and battle if you can!
>
> -----------------
> WxPython code:
> -----------------
>
> https://sites.google.com/site/thefut...ode-challenges




I have downloaded that simple program, launched it, and I've tested it with JAWS screen reader.
It was fully accessible out of the box.

Have you done something special for making it accessible for screen readers? (I guess not).

Can be the same thing done with Tkinter?

Octavian

 
Reply With Quote
 
Stefan Behnel
Guest
Posts: n/a
 
      01-23-2011
rantingrick, 23.01.2011 01:07:
> I have in many threads declared that Tkinter (and TclTk) is currently
> --and has been for a decade-- the wrong choice for Python's stdlib
> GUI. [...]
> It is time to prove once and for all how dated and worthless Tkinter
> is compared to wxPython.


What's the aim of that prove? If you are trying to pave the ground for
getting wxPython in the stdlib instead of tkinter, I think that's bound to
fail. Similar proposals have been rejected with the simple argument that
adding a large library with a huge C dependency to the standard library
without having a rock solid maintainer for both of them is not going to happen.

Are you volunteering to maintain both wxPython and wxWidgets in the
standard library for, say, twenty years to come?

Stefan

 
Reply With Quote
 
rusi
Guest
Posts: n/a
 
      01-23-2011
On Jan 23, 5:07*am, rantingrick <(E-Mail Removed)> wrote:
> WxPython versus Tkinter (A code battle to the death!)
>
> by Rick Johnson.
>
> I have in many threads declared that Tkinter (and TclTk) is currently
> --and has been for a decade-- the wrong choice for Python's stdlib
> GUI. Throughout the 90's Tkinter was fine. However we have been in the
> 21st century for more than a decade and Tkinter is no longer relevant.
> Many people have argued (weakly) that Tkinter is still valid. However
> their arguments have been mostly baseless opinions that sadly lack
> vision for the future.
>
> In this thread i intend to slay my enemies with cold hard facts based
> on code. It is time to put your code where your mouth is (or you
> foot). This will be an open challenge to *anyone* in this community,
> in the world, and *even* the great Guido van Rossum himself! It is now
> time for you (python community) to prove the worth of Tkinter or
> accept its demise at my hands!
>
> Some of you may think this sounds like an impossible challenge. How
> can one man defend his position against the entire world! Yes, it
> would seem impossible for one man to face an entire community in open
> challenge! And in most cases only a fool would challenge the world.
> However, i have not one ounce of fear within me while facing these
> odds because my position is the correct position. My position is based
> on facts and NOT friendship, truth and NOT tantrums, and finally
> vision NOT vengance! I am on the correct side of history!
>
> It is time to prove once and for all how dated and worthless Tkinter
> is compared to wxPython. Yes, WxPython is not as advanced as i would
> like it to be for a 21st century GUI library. However compared to
> Tkinter, Wx is light years ahead! Wx is our best hope to move Python
> into the 21st century.
>
> So now is the time for all you naysayers, trolls, and minions to face
> me in mortal combat within the arena of truth and righteousness. Ready
> your minds and wield your text editors for we shall battle for the
> glory of Python! And when i have slayed the fools with their own
> foolishness then ye all shall be enlightened!
>
> So PUT UP OR SHUT THE HELL UP!
>
> ---------------------------------------
> *Challenge 1: (Simple Directory Viewer)
> ---------------------------------------
>
> Create a simple Directory Viewer GUI. You CANNOT use a treectrl! *The
> point of this challenge is to show that Tkinter has no support for a
> true ListCtrl widget. However the Wx::ListCtrl is fully featured! For
> wxPython the code is simply wielding a few built in classes. For
> Tkinter no such ListCtrl functionality exists. You CAN create the
> functionality yourself (and i know this because i HAVE created it!)
> however it involves tons of work and still can't hold a candle to the
> wx::ListCtrl
>
> ---------------
> *Requirements:
> ---------------
>
> How the user navigates to a folder is not important but you must
> display the list of files/folders in two view modes with icons;
>
> *1. Display files in both ReportView and ListView.
>
> * * Reportview:
> * * ...scrollable vertical list with three columns.
>
> * * Listview:
> * * ...scrollable horizontal-ly wrapping list.
>
> Note: If you do not understand the view modes just run my code for an
> example. But the user must be able to switch between these two modes
> easily. How the switching is done is unimportant -- I simply used two
> buttons.
>
> *2. Columns
> * * Minimum of three cols; Name, Size, and Type (reportview).
> * * the "Name" column must include an icon AND label (both views).
> * * columns must be sortable by the user (reportview).
> * * columns must be sizable by the user (reportview).
>
> *3. Items
> * * All must be editable in place (no popup editing allowed!).
> * * All items must be selectable/deselectable by user.
> * * All items must be delete-able by the user.
>
> That is the challenge. Step forth and battle if you can!
>
> -----------------
> *WxPython code:
> -----------------
>
> https://sites.google.com/site/thefut...ode-challenges
>
> I await any challengers...


Tried the code with debian sid and default python (2.6)

I get (after some loading... statements)

Segmentation fault

[Actually this is the first time in my 10 years of python that Ive
seen a pure python module segfault ]
 
Reply With Quote
 
Steven D'Aprano
Guest
Posts: n/a
 
      01-23-2011
On Sun, 23 Jan 2011 02:18:34 -0800, rusi wrote:

>> *WxPython code:

[...]
> Tried the code with debian sid and default python (2.6)
>
> I get (after some loading... statements)
>
> Segmentation fault
>
> [Actually this is the first time in my 10 years of python that Ive seen
> a pure python module segfault ]


wxPython is a front end to the wxWidgets (formerly wxWindows) toolkit,
which is C++. I imagine that's what seg faulted.



--
Steven
 
Reply With Quote
 
Adam Skutt
Guest
Posts: n/a
 
      01-23-2011
On Jan 22, 7:07*pm, rantingrick <(E-Mail Removed)> wrote:
> So PUT UP OR SHUT THE HELL UP!


You first. Write actual working code first and then you can challenge
people. I found 5 bugs in your code before I quit looking[1]. Can you
find and fix them all? Also, I'm entirely ignoring the bad styling,
bad default sizing, horrible UI, the fact you call rename "Edit", and
the fact the context menu doesn't do anything. All of the are
legitimate technical errors, i.e., you coded the program wrong.

In the spirit of community I open the bug finding to everyone, but
humbly ask you don't tell Mr. "rantingrick" Johnson about them. It
can be our little secret

Adam

[1] I think there might even be more, but I got lazy.
 
Reply With Quote
 
rantingrick
Guest
Posts: n/a
 
      01-23-2011
On Jan 22, 9:39*pm, Terry Reedy <(E-Mail Removed)> wrote:
> On 1/22/2011 7:07 PM, rantingrick wrote:
>
> Near the beginning of this thread, I gently challenged you to produce a
> concrete, practical proposal for an stdlib addition that could be
> critiqued and improved. When you asked for problems with
> wxwidgets/wxpython, I gave some. Still waiting.


You may have done this however i do not remember. With all the
trolling that was going on (not you) i may have missed it.
 
Reply With Quote
 
rantingrick
Guest
Posts: n/a
 
      01-23-2011
On Jan 23, 1:53*am, "Octavian Rasnita" <(E-Mail Removed)> wrote:

> I have downloaded that simple program, launched it, and I've tested it with JAWS screen reader.
> It was fully accessible out of the box.


Excellent!

> Have you done something special for making it accessible for screen readers? (I guess not).


I did nothing to make the code more accessible, that is just another
great attribute of 21st cenury GUI libraries.

> Can be the same thing done with Tkinter?


Not that i am aware of.
 
Reply With Quote
 
Arndt Roger Schneider
Guest
Posts: n/a
 
      01-23-2011
rantingrick schrieb:

[snip]

1. You cannot define the terms--restrict your opponent--
and battle it yourselves.
2. Your specified directory browser is useless.
--At least define that the directory browser must have
constant complexity to work with volatile
data over a network...

-roger

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Mozilla versus IE versus Opera versus Safari Peter Potamus the Purple Hippo Firefox 0 05-08-2008 12:56 PM
equal? versus eql? versus == versus === verus <=> Paul Butcher Ruby 12 11-28-2007 06:06 AM
Certification - MCP versus MCSA versus MCSE =?Utf-8?B?Q2FuYWRhX0d1eU0=?= Microsoft Certification 1 08-24-2006 06:33 PM
script versus code versus ? Russ ASP .Net 1 06-10-2004 03:06 AM
HTML Client Control versus. HTML Server Control versus. Web Server Control Matthew Louden ASP .Net 1 10-11-2003 07:09 PM



Advertisments