Python3 GUI (tk) questions

Re: Python3 GUI (tk) questions

by Richard Lobb -
Number of replies: 0
Sure. The python3_tkinter question type you're using is a fairly old one. At that time, the 1-week GUI section of the course required students to use textvariables, as that was deemed to be the "correct" approach by some of our teaching team. In a later version of the course I switched to using the get method on widgets instead, and didn't teach textvariables at all. Of course, the question type was adapted accordingly. As I recall, though, some widgets didn't have a get method, so couldn't be used at all in that version of the course!
 
tkinter has some pretty horrible behaviours so no matter what you do there will be times when students submit code that works with the actual tkinter and fails with the simulated version in the question type. All you can do is try to provide helpful error messages and use low or no penalties.
 
Happily I no longer teach a course that uses tkinter :-)