HOME/Articles/

matplotlib example interrupt loop (snippet)

Article Outline

Python matplotlib example 'interrupt loop'

python interrupt loop

Python matplotlib example: interrupt loop

# Fancy way to interrupt a while loop in IPython notebook

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