summaryrefslogtreecommitdiffstats
path: root/Demo/stdwin/TestSched.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-05-11 14:43:52 (GMT)
committerGuido van Rossum <guido@python.org>2000-05-11 14:43:52 (GMT)
commitdab6cb8f6dacc107e9482976ca2f8e0313f05131 (patch)
tree88eef631a9c853ed763bb1be126ad3a11d6185db /Demo/stdwin/TestSched.py
parentede8c6eea1da425960b27ed735a41bc23a72a89a (diff)
downloadcpython-dab6cb8f6dacc107e9482976ca2f8e0313f05131.zip
cpython-dab6cb8f6dacc107e9482976ca2f8e0313f05131.tar.gz
cpython-dab6cb8f6dacc107e9482976ca2f8e0313f05131.tar.bz2
removing more stdwin users
Diffstat (limited to 'Demo/stdwin/TestSched.py')
-rwxr-xr-xDemo/stdwin/TestSched.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/Demo/stdwin/TestSched.py b/Demo/stdwin/TestSched.py
deleted file mode 100755
index 29274e6..0000000
--- a/Demo/stdwin/TestSched.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#! /usr/bin/env python
-
-# TestSched
-
-import stdwin
-from WindowParent import WindowParent, MainLoop
-import WindowSched
-from Buttons import PushButton
-
-def my_ringer(child):
- child.my_id = None
- stdwin.fleep()
-
-def my_hook(child):
- # schedule for the bell to ring in N seconds; cancel previous
- if child.my_id:
- WindowSched.cancel(child.my_id)
- child.my_id = \
- WindowSched.enter(child.my_number*1000, 0, my_ringer, (child,))
-
-def main(n):
- from CSplit import CSplit
-
- window = WindowParent().create('TestSched', (0, 0))
- csplit = CSplit().create(window)
-
- for i in range(n):
- child = PushButton().define(csplit)
- child.my_number = i
- child.my_id = None
- child.settext(`(i+n-1)%n+1`)
- child.hook = my_hook
-
- window.realize()
-
- WindowSched.run()
-
-main(12)