import threading
from PySimpleGUI import PySimpleGUI as sg
def thread2():
while (x == True):
if values["radio"] == True:
print("true")
def thread1():
tab1_layout = [
[sg.Radio('G', "RADIO1", default=True, size=(10,1), key='radio'), sg.Radio('R', "RADIO1")]
]
(...)
while True:
events, values = janela.read()
threading.Thread(target=thread1).start()
sleep(5)
threading.Thread(target=thread12).start()
My code is something like that How can I acess user values option of the radio using Multithreaded and pysimplegui?
error: name 'values' is not defined