diff options
author | Guido van Rossum <guido@python.org> | 1993-01-13 12:45:41 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-01-13 12:45:41 (GMT) |
commit | 7b741767621f57aa068186cd03733d166858fe1d (patch) | |
tree | b8a38652afaa376800b2d03e08cdfb7eea1c0d51 /Demo/stdwin | |
parent | e89341250dc00b9c6920024fe9a64e7183da7a55 (diff) | |
download | cpython-7b741767621f57aa068186cd03733d166858fe1d.zip cpython-7b741767621f57aa068186cd03733d166858fe1d.tar.gz cpython-7b741767621f57aa068186cd03733d166858fe1d.tar.bz2 |
Close the window when receiving a close request; turn time into int.
Diffstat (limited to 'Demo/stdwin')
-rwxr-xr-x | Demo/stdwin/clock.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Demo/stdwin/clock.py b/Demo/stdwin/clock.py index 0f7d6a9..975154a 100755 --- a/Demo/stdwin/clock.py +++ b/Demo/stdwin/clock.py @@ -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() |