Перерыв петли Python на Keypress

try:
    while True:
        do_something()
except KeyboardInterrupt:
    pass
Tommyom