TBUTTON COMMAND PYTHON code example
Example 1: how to find the text inside button in tkinter
my_text = my_button.cget('text')
Example 2: how to create a button python
import Tkinter
import tkMessageBox
top = Tkinter.Tk()
def helloCallBack():
tkMessageBox.showinfo( "Hello Python", "Hello World")
B = Tkinter.Button(top, text ="Hello", command = helloCallBack)
B.pack()
top.mainloop()