Im trying to figure out how to change a string into a name of a Button
.
For example if I had the string self._name = 'self._prentice'
, I would like to make self._prentice = tk.Button(master)
. I need to do it this way as the string could be any name and I need to create a way of storing this so I can later pack
or destroy
it.
I've tried using exec
, however I could only get it to work for integers and not buttons.