Handle a signal: Difference between revisions

Content added Content deleted
Line 751: Line 751:
print n
print n
except KeyboardInterrupt, e:
except KeyboardInterrupt, e:
print 'Program has run for %5.3f seconds.' % (time.time() - t1)
break
break
print 'Program has run for %5.3f seconds.' % (time.time() - t1)


counter()</lang>
counter()</lang>