I have a list of dictionaries in a format like this:
dict_list = [{'Contact Name' : 'Jeff Bezos', 'Email' : 'Jeff@Amazon.com', 'Send' : 0},
{'Contact Name' : 'Bill Gates', 'Email' : 'Bill@Microsoft.com', 'Send' : 0}]
I currently display each name using Tkinter:
for eachclient in dict_list:
contactLabel = Label(text='Contact Name: ' + eachclient['Contact Name'])
emailLabel = Label(text='Contact Email: ' + eachclient['Email'])
I need a Tkinter checkbox that can modify the value of 'Send' for each entry in dict_list.
I will also add a send button that will send only if the checkbox is checked.
(The send button will call a command like:)
def buttonCheck():
for eachclient in dict_list:
if eachclient 'Send' = 1:
send the message
else:
skip this client
Is this possible? I greatly appreciate any help I can get!