I have made a function called get_data['name'].
This function gets a string('name' for example) and the output is an array of number.
I have made few button with tkinter that looks like this:
# A Button
A_Button = Button(GUI, image=A_Im, command=get_data('a_name'))
A_Button.grid(column=0, row=1)
# C Button
C_Button = Button(GUI,image=C_Im,command=get_data('c_name'))
C_Button.grid(column=0, row=2)
# D_Button
D_Button = Button(GUI, image=D_Im, command=get_data('d_name'))
D_Button.grid(column=0, row=3)
However, when i run the code, It executes the function get_data for every button, while i wanted it to work only when i click the specific button.
How can i make it work only at click?
Thank you.