I have a Python 3.6 application that waits indefinitely for the user to push a button.
while(1)
    print('You have 10 seocnds to push the button and start the connection wizard')
    If if GPIO.input(button1)==0: 
        subprocess.call(["wifi", "--clear=ssid"])
However, I only want to allow 10 seconds to push the button before moving on, how?
I have tried looping (for loop) but this just iterates and did not work. 
 
    