MCS 260 Fall 2021
Emily Dumas
Idle is a graphical code development environment (or integrated development environment, IDE) for Python.
It is the officially-supported IDE for Python.
Continue working on the GUI password generator we started in lecture 38.
So far: Built GUI controls.
Remaining: Connect controls to program logic.
tkinter has its own variable classes (StringVar, IntVar, DoubleVar) with .get(), .set(...).
Widgets support these, e.g. with Label widget's textvariable constructor argument.
Can ask to call a function of three arguments when a variable is changed:
varobj.trace_add("write",func_to_call)
This widget's constructor accepts many args, including:
from_ — minimum valueto — maximum valuevariable — variable in which to store slider valuecommand — function to call on changeA big topic we didn't discuss is adding menus to tkinter applications.
TkDocs has a nice discussion and tutorial.