Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 1f28ddc230
Fetching contributors…

Cannot retrieve contributors at this time

executable file 26 lines (18 sloc) 0.373 kb
#!/usr/bin/python
import time
import signal
class Bool:
value = True
flag = Bool()
def handler(s, f):
print "handler"
flag.value = False
signal.signal(signal.SIGINT, handler)
def callback():
print "flag: " + `flag.value`
return flag.value
while True:
if not callback():
print "callback returned False"
break
time.sleep(1)
Jump to Line
Something went wrong with that request. Please try again.