def input():
sg.theme('TanBlue')
event, values = sg.Window('Login Window',
[[sg.T('Please Enter your email'), sg.In(key='-ID-')],
[sg.B('OK'), sg.B('Cancel') ]]).read(close=True)
login_id = values['-ID-']
return login_id
I have this simple function written in python, it a small GUI that pops up to take input from a user. but what I'm trying to do is, after a certain amount of time lets say 10 seconds. if no input is given I want to close the GUI and use a default value for the intended input. my entire script pauses using this GUI, if no input is given then the script won't continue. I do not want that, but I can't figure out how to implement this. I tried using the signal in python, but I'm on windows 10 and I couldn't integrate it correctly. I would like a universal solution for this Thanks