]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Close the window when receiving a close request; turn time into int.
authorGuido van Rossum <guido@python.org>
Wed, 13 Jan 1993 12:45:41 +0000 (12:45 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 13 Jan 1993 12:45:41 +0000 (12:45 +0000)
Demo/stdwin/clock.py

index 0f7d6a960252fb0b0f7f4d08a5611933c880b35c..975154a5e8404abb5346783b65f7446b20ddddeb 100755 (executable)
@@ -68,6 +68,7 @@ def cdispatch(event):
                setdimensions(win)
        elif type == WE_CLOSE:
                mainloop.unregister(win)
+               win.close()
 
 def setdimensions(win):
        width, height = win.getwinsize()
@@ -198,6 +199,6 @@ def dd(n):
        return '0'*(2-len(s)) + s
 
 def getlocaltime():
-       return time.time() - TZDIFF
+       return int(time.time() - TZDIFF)
 
 main()