Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python loop break on keypress

try:
    while True:
        do_something()
except KeyboardInterrupt:
    pass
 
PREVIOUS NEXT
Tagged: #python #loop #break #keypress
ADD COMMENT
Topic
Name
2+1 =