Tkinter: runtime widget naming?

sternber at socrates.Berkeley.EDU sternber at socrates.Berkeley.EDU
Thu May 24 13:45:36 EDT 2001


I'm translating a Tk system that does alot of this:

  set b ".mybutton"
  ...
  button $b ...

What is a good way to do this in Python?  There is, of course,

  b = "mybutton"
  ...
  exec( b + "= Button(...)" )

Is there a better way?




More information about the Python-list mailing list