Do things for a period of time program in python
Question: I made a program in python that looks like this:

    
    
    import time
    y = "a"
    x = 0
    while x != 10 and y == "a":
        y = input("What is your name? ")
        time.sleep(1)
        x = x + 1
    if y != "a":
        print("Hi " + y)
    else:
        print("You took too long to answer...")
    

I know that there is a way of accomplishing the same thing at this question:
[Keyboard input with timeout in
Python](http://stackoverflow.com/questions/1335507/keyboard-input-with-
timeout-in-python), but I would like to know why this is not working. No
matter how long I wait it doesn't time out; it just sits there waiting for me
to type something in. What have I done wrong? I am using python 3.3 on Win 7.


Answer: Input is blocking in python. Meaning `time.sleep(1)` line and all lines after
only get executed after the input is received.

