Python Loop Break On KeyPress

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