summaryrefslogtreecommitdiffstats
path: root/Demo/stdwin
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-01-13 12:45:41 (GMT)
committerGuido van Rossum <guido@python.org>1993-01-13 12:45:41 (GMT)
commit7b741767621f57aa068186cd03733d166858fe1d (patch)
treeb8a38652afaa376800b2d03e08cdfb7eea1c0d51 /Demo/stdwin
parente89341250dc00b9c6920024fe9a64e7183da7a55 (diff)
downloadcpython-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-xDemo/stdwin/clock.py3
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()