Bugs/issues in tkinter.simpledialog!!

Discussion in 'Python' started by rantingrick, Jan 26, 2011.

  1. rantingrick

    rantingrick Guest

    I just installed Python 3,0 on my machine. I cannot use 3.0
    exclusively yet however i was interested in just poking around and
    acquiring a taste if you will. I was happy to find that the new
    Tkinter module names now follow convention and are placed correctly...
    example: "tkinter.simpledialog"

    However some things never change it seems and some improvements are
    actually a step backwards. The same problems with the unit test in 2.x
    got ported to 3.x. And the new SimpleDialog is just more lackluster
    code like we've seen before. I was hoping to be amazed, i am
    disappointed and disgusted. It is obvious that whoever is writing/
    maintaining the tkinter code base does NOT understand tkinter
    completely and this is blinding apparent by reading the source code!

    -----------
    Issues
    -----------

    First lets start with the problems that migrated from 2.x...
    (tkinter.simpledialog)

    #-- ISSUE 1 --#
    In the test() function we still have code that uses the "quit" method
    instead of "destroy". Calling the "quit" method only tells Tkinter to
    stop processing events, IT DOES NOT DESTROY THE WIDGET!! And on
    windows the the root will then become unresponsive -- you cannot close
    the window, you cannot do anything. I have said time and time again.
    DO NOT USE THE QUIT METHOD UNLESS YOU KNOW WHAT THE HECK YOU ARE
    DOING! So the code needs to be this...

    OLD:
    q = Button(root, text='Quit', command=t.quit)

    NEW:
    q = Button(root, text='Quit', command=root.destroy)


    #-- ISSUE 2: --#
    The author used a very strange method by which to denote the default
    button in the SimpleDialog class. He choose to set the relief to RIDGE
    and the border "8". This not only looks horrible (and exposes the
    authors ignorance of tkinter) but a much more elegant solution is
    provided by the TclTk folks. All buttons have a "default" option that
    will display the button with a nice border so the user can visually
    see which button is active. So the code should be this....

    OLD:
    if num == default:
    b.config(relief=RIDGE, borderwidth=8)

    NEW:
    if num == default:
    b.config(default=ACTIVE)


    Last but not least i am puzzled as to why we choose the method name
    "go" over "show". for "showing" the dialog. SimpleDialog uses no
    inheritance so name clashes are mum. Why would anyone choose "go" over
    "show" for a modal dialog? I would really like an explanation for
    this.


    Other minor issues exists. I may describe them later. At this time we
    need to fix these grave abominations first.
    rantingrick, Jan 26, 2011
    #1
    1. Advertising

  2. On 1/26/2011 8:00 AM rantingrick said...
    >
    > I just installed Python 3,0 on my machine.


    Try it again on the current release candidate --
    http://www.python.org/download/releases/3.2/ -- testing old first
    release code and reporting on its problems won't get any traction.
    Verify the problem continues to exist in the current maintained version
    and then ask. If you get confirmation that the behavior is likely a
    bug, file a bug report so those who can and do can do (or at least
    consider).

    See http://docs.python.org/bugs.html
    http://www.python.org/dev/peps/pep-0003/

    Emile
    Emile van Sebille, Jan 26, 2011
    #2
    1. Advertising

  3. rantingrick

    rantingrick Guest

    On Jan 26, 10:43 am, Emile van Sebille <> wrote:
    > On 1/26/2011 8:00 AM rantingrick said...


    > > I just installed Python 3,0 on my machine.

    >
    > Try it again on the current release candidate --http://www.python.org/download/releases/3.2/-- testing old first
    >
    > Seehttp://docs.python.org/bugs.htmlhttp://www.python.org/dev/peps/pep-0003/


    Why would i want to waste bandwidth downloading an RC? Can i not just
    browse the source online? I only need to check one module. Where is
    the source available for viewing "simpledialog" online?

    Thanks

    PS: The version i have now is 3.1.1 (but i would like to see the
    newest version available, just not download it!)
    rantingrick, Jan 26, 2011
    #3
  4. On Wed, Jan 26, 2011 at 11:53 AM, rantingrick <> wrote:
    > On Jan 26, 10:43 am, Emile van Sebille <> wrote:
    >> On 1/26/2011 8:00 AM rantingrick said...

    >
    >> > I just installed Python 3,0 on my machine.

    >>
    >> Try it again on the current release candidate --http://www.python.org/download/releases/3.2/-- testing old first
    >>
    >> Seehttp://docs.python.org/bugs.htmlhttp://www.python.org/dev/peps/pep-0003/

    >
    > Why would i want to waste bandwidth downloading an RC? Can i not just
    > browse the source online? I only need to check one module. Where is
    > the source available for viewing "simpledialog" online?
    >
    > Thanks
    >
    > PS: The version i have now is 3.1.1 (but i would like to see the
    > newest version available, just not download it!)


    The code is hosted on http://svn.python.org

    If you just one that one file, it's at
    http://svn.python.org/view/python/trunk/Lib/lib-tk/tkSimpleDialog.py?view=markup

    > --
    > http://mail.python.org/mailman/listinfo/python-list
    >
    Benjamin Kaplan, Jan 26, 2011
    #4
  5. rantingrick

    rantingrick Guest

    On Jan 26, 11:55 am, Benjamin Kaplan <> wrote:

    > The code is hosted onhttp://svn.python.org



    Thanks!
    rantingrick, Jan 26, 2011
    #5
  6. rantingrick

    rantingrick Guest

    On Jan 26, 11:55 am, Benjamin Kaplan <> wrote:

    [...snip...]

    Well i should have looked before i leaped :)

    This looks like an old 2.x version. I am looking for the newest
    version with is renamed to "simpledialog" and contains a new class
    called "SimpleDialog". Do you know were i can view this module?

    Thanks again.
    rantingrick, Jan 26, 2011
    #6
  7. rantingrick

    Terry Reedy Guest

    On 1/26/2011 11:53 AM, rantingrick wrote:

    To answer your other post, one of the main people to touch tkinter in
    the last 3 years was Guilherme Polo, who worked on it during and after a
    Google Summer of Code project. He does not seen to be active currently.

    There are currently 63 open issues on the tracker listing tkinter as a
    component. There are probably a few that could be closed. When I have
    learned more, I should be able to review any patched sitting around.


    > On Jan 26, 10:43 am, Emile van Sebille<> wrote:
    >> On 1/26/2011 8:00 AM rantingrick said...
    >>> I just installed Python 3,0 on my machine.

    >>
    >> Try it again on the current release candidate --http://www.python.org/download/releases/3.2/-- testing old first
    >>
    >> Seehttp://docs.python.org/bugs.htmlhttp://www.python.org/dev/peps/pep-0003/

    >
    > Why would i want to waste bandwidth downloading an RC? Can i not just
    > browse the source online? I only need to check one module. Where is
    > the source available for viewing "simpledialog" online?
    >
    > Thanks
    >
    > PS: The version i have now is 3.1.1 (but i would like to see the
    > newest version available, just not download it!)


    I was hoping you meant 3.1.something, not 3.0. Latest is 3.1.3.

    3.2c2 will be out very soon, and 3.2 2 weeks after if no problems arise.
    As far as the doc and stdlib go, 3.2 is probably one of the most
    improved releases ever, as they got almost all the attention with no
    syntax changes allowed. When it is out, I will strongly recommend
    upgrading, absent a really good reason not to.

    >(but i would like to see the
    > newest version available, just not download it!)


    http://svn.python.org/view/python/b...er/simpledialog.py?revision=81010&view=markup

    go back up a step and you can look at the log of changes.
    For current python 3 in general:

    http://svn.python.org/view/python/branches/py3k/

    If you install TortoiseSVN, it is trivial to download the whole source
    tree. I believe you could also just download a subtree, like the tkinter
    and/or idlelib subtrees.

    Sometime after 3.2 is out, we will move from svn to hg and above will
    change.

    --
    Terry Jan Reedy
    Terry Reedy, Jan 26, 2011
    #7
  8. rantingrick

    rantingrick Guest

    On Jan 26, 3:57 pm, Terry Reedy <> wrote:
    > On 1/26/2011 11:53 AM, rantingrick wrote:
    >
    > To answer your other post, one of the main people to touch tkinter in
    > the last 3 years was Guilherme Polo, who worked on it during and after a
    > Google Summer of Code project. He does not seen to be active currently.
    >
    > There are currently 63 open issues on the tracker listing tkinter as a
    > component. There are probably a few that could be closed. When I have
    > learned more, I should be able to review any patched sitting around.


    Well i tried searching for "Tkinter" issues on the tracker and just
    got annoyed quickly and left. It seems far to complicated to do
    searches with this software.


    Anyhoo, i did find the most current version of tksimpledialog.py and
    sure enough all the issues i have documented have been ported into
    this new version.
    rantingrick, Jan 28, 2011
    #8
  9. 2011/1/26 rantingrick <>:
    >
    > I just installed Python 3,0 on my machine. I cannot use 3.0
    > exclusively yet however i was interested in just poking around and
    > acquiring a taste if you will. I was happy to find that the new
    > Tkinter module names now follow convention and are placed correctly...
    > example: "tkinter.simpledialog"
    >
    > However some things never change it seems and some improvements are
    > actually a step backwards. The same problems with the unit test in 2.x
    > got ported to 3.x. And the new SimpleDialog is just more lackluster
    > code like we've seen before. I was hoping to be amazed, i am
    > disappointed and disgusted. It is obvious that whoever is writing/
    > maintaining the tkinter code base does NOT understand tkinter
    > completely and this is blinding apparent by reading the source code!
    >
    > -----------
    >  Issues
    > -----------
    >
    > First lets start with the problems that migrated from 2.x...
    > (tkinter.simpledialog)
    >
    > #-- ISSUE 1 --#
    > In the test() function we still have code that uses the "quit" method
    > instead of "destroy". Calling the "quit" method only tells Tkinter to
    > stop processing events, IT DOES NOT DESTROY THE WIDGET!! And on
    > windows the the root will then become unresponsive -- you cannot close
    > the window, you cannot do anything. I have said time and time again.
    > DO NOT USE THE QUIT METHOD UNLESS YOU KNOW WHAT THE HECK YOU ARE
    > DOING! So the code needs to be this...
    >
    > OLD:
    >   q = Button(root, text='Quit', command=t.quit)
    >
    > NEW:
    >   q = Button(root, text='Quit', command=root.destroy)
    >
    >
    > #-- ISSUE 2: --#
    > The author used a very strange method by which to denote the default
    > button in the SimpleDialog class. He choose to set the relief to RIDGE
    > and the border "8". This not only looks horrible (and exposes the
    > authors ignorance of tkinter) but a much more elegant solution is
    > provided by the TclTk folks. All buttons have a "default" option that
    > will display the button with a nice border so the user can visually
    > see which button is active. So the code should be this....
    >
    > OLD:
    >            if num == default:
    >                b.config(relief=RIDGE, borderwidth=8)
    >
    > NEW:
    >            if num == default:
    >                b.config(default=ACTIVE)
    >
    >
    > Last but not least i am puzzled as to why we choose the method name
    > "go" over "show". for "showing" the dialog.  SimpleDialog uses no
    > inheritance so name clashes are mum. Why would anyone choose "go" over
    > "show" for a modal dialog? I would really like an explanation for
    > this.
    >
    >
    > Other minor issues exists. I may describe them later. At this time we
    > need to fix these grave abominations first.
    > --
    > http://mail.python.org/mailman/listinfo/python-list


    Why don't you file a ticket on the bug tracker instead of wasting
    yours and other people's time here by making appear another rant
    against Tkinter as a bug report?
    It's been 3 days in a row you've been doing this. Aren't you tired?
    Seriously! This has come to not even being a rant anymore. It's just nonsense.


    --- Giampaolo
    http://code.google.com/p/pyftpdlib/
    http://code.google.com/p/psutil/
    Giampaolo Rodolà, Jan 28, 2011
    #9
  10. rantingrick

    rantingrick Guest

    On Jan 28, 8:52 am, Giampaolo Rodolà <> wrote:

    > Why don't you file a ticket on the bug tracker instead of wasting
    > yours and other people's time here by making appear another rant
    > against Tkinter as a bug report?


    Why don't you instead thank me for helping out instead of jumping to
    irate conclusions? It would *seem* that if YOU cared about the future
    of Python you would be more *accepting* of my help.

    > [...snip: shameless plugs...]


    Oh, i see why you dropped by; First to score some points on my behalf
    and then to plug your own software. Interesting.
    rantingrick, Jan 28, 2011
    #10
  11. On Fri, Jan 28, 2011 at 3:24 PM, rantingrick <> wrote:
    > On Jan 28, 8:52 am, Giampaolo Rodolà <> wrote:
    >
    >> Why don't you file a ticket on the bug tracker instead of wasting
    >> yours and other people's time here by making appear another rant
    >> against Tkinter as a bug report?

    >
    > Why don't you instead thank me for helping out instead of jumping to
    > irate conclusions? It would *seem* that if YOU cared about the future
    > of Python you would be more *accepting* of my help.
    >


    It's not that people don't appreciate your help. It's that the mailing
    list is not the appropriate place for this type of discussion. Once
    it's been verified as a bug, you should create a ticket on the bug
    tracker, come back here and post a link, and then move the discussion
    over to the tracker. Even if you intend to fix it yourself, you should
    create a ticket and then attach the patch to the ticket when you fix
    it.
    Benjamin Kaplan, Jan 28, 2011
    #11
  12. rantingrick

    rantingrick Guest

    On Jan 28, 2:34 pm, Benjamin Kaplan <> wrote:

    > It's not that people don't appreciate your help.


    First: Thanks for the reasonable response.

    > It's that the mailing
    > list is not the appropriate place for this type of discussion.


    Actually i see you point but there is a good reason behind me bringing
    this up here. I want to bring to the attention of everyone how little
    interest there is for Tkinter. Not many folks are using Tkinter, most
    hate Tkinter, and not many (if any) are capable of patching the
    Tkinter source code. It has been mentioned in this thread that the
    last person to do any real work on Tkinter is someone from two years
    ago. This is insanity! You know why i think nobody cares..

    * Too much trouble to get patches submitted.
    * Nobody really cares at py-dev so the patches never get resolved.
    * There is resistance in the community to "outsiders".

    This mentality is setting us up for a bad bad future. Why are people
    so pedantic and emotional. Python does not belong to me, or you, or
    anybody. This is a team effort. And whist we need people doing work we
    also need to listen to the community. I have had nothing but an uphill
    battle dealing with a few "elites" on this list. Anybody can see that
    i am serious about helping out. Heck, i want Tkinter to be removed
    from the stdlib but yet i still offer help to noobies and still report
    bugs.

    > Once
    > it's been verified as a bug, you should create a ticket on the bug
    > tracker, come back here and post a link, and then move the discussion
    > over to the tracker.


    Agreed. However i would rather just write a patch, send it to some
    email and be done. Or just commit the changes myself. This bug
    tracker is just bureaucracy at it's worst. You are making this process
    too hard and people are not going to get involved when they have to
    jump through 20 hoops just to patch three lines of freaking code!
    There is too much red tape here. I COULD HAVE PATCHED HUNDREDS OF LINE
    OF CODE IN THE TIME I HAVE WASTED WITH THE BUG TRACKER PROCESS ALONE!
    I understand we need checks and balances but at some point the very
    safety net we rely on becomes a noose around our neck! Something
    needs to be done!
    rantingrick, Jan 28, 2011
    #12
  13. rantingrick

    alex23 Guest

    rantingrick <> wrote:
    > Actually i see you point but there is a good reason behind me bringing
    > this up here. I want to bring to the attention of everyone how little
    > interest there is for Tkinter.


    Right. You have no interest in resolving this issue and instead want
    to use it as more ammunition in your ongoing crusade. You even have
    the gall to act _offended_ at Giampaolo's suggestion that you log the
    bug, dumping your usual bullshit and vitriol on someone WHO HAS
    ACTUALLY DONE THE SORT OF WORK YOU CONSTANTLY CLAIM YOU'RE GOING TO,
    even though your every intention was to parade this issue around as if
    it somehow validates your personal blend of crazy.

    You're a class act, that's for sure.

    > Agreed. However i would rather just write a patch, send it to some
    > email and be done. Or just commit the changes myself. This bug
    > tracker is just bureaucracy at it's worst. You are making this process
    > too hard and people are not going to get involved when they have to
    > jump through 20 hoops just to patch three lines of freaking code!


    Because complex distributed coding projects should be treated like
    Wikipedia?

    It must suck being such a genius and yet be unable to grapple with a
    simple bug tracker...
    alex23, Jan 31, 2011
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Epler
    Replies:
    0
    Views:
    504
    Jeff Epler
    Aug 20, 2004
  2. Replies:
    0
    Views:
    362
  3. Alexey Verkhovsky
    Replies:
    5
    Views:
    101
    Yukihiro Matsumoto
    Oct 5, 2004
  4. Josef 'Jupp' Schugt

    Still use 'ruby-bugs' for Ruby bugs?

    Josef 'Jupp' Schugt, Nov 4, 2004, in forum: Ruby
    Replies:
    2
    Views:
    160
    Tom Copeland
    Nov 4, 2004
  5. BNelson

    Issues with tkinter

    BNelson, Jun 3, 2014, in forum: Python
    Replies:
    0
    Views:
    40
    BNelson
    Jun 3, 2014
Loading...

Share This Page