diff options
author | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-09 03:39:21 +0000 |
commit | d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8 (patch) | |
tree | db4a6e4835e04851df721eb4595d7172d8e05c34 /Lib/stdwin/stdwinq.py | |
parent | 045e688f6fc06c87cc93f84e42fb4767a04ba559 (diff) | |
download | cpython-git-d7500fcbb4d0257f3bcd0c87d17ee61f3b1545e8.tar.gz |
These directories renamed: tkinter -> lib-tk, stdwin -> lib-stdwin.
Diffstat (limited to 'Lib/stdwin/stdwinq.py')
-rwxr-xr-x | Lib/stdwin/stdwinq.py | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/Lib/stdwin/stdwinq.py b/Lib/stdwin/stdwinq.py deleted file mode 100755 index af72986d68..0000000000 --- a/Lib/stdwin/stdwinq.py +++ /dev/null @@ -1,53 +0,0 @@ -# Replacements for getevent() and pollevent(), -# and new functions ungetevent() and sync(). - - -# Every library module should ideally use this instead of -# stdwin.{get,poll}event(), so applications can use the services -# of ungetevent() and sync(). - - -import stdwin - - -# Events read ahead are stored in this queue. -# -queue = [] - - -# Replacement for getevent(). -# -def getevent(): - if queue: - event = queue[0] - del queue[0] - return event - else: - return stdwin.getevent() - - -# Replacement for pollevent(). -# -def pollevent(): - if queue: - return getevent() - else: - return stdwin.pollevent() - - -# Push an event back in the queue. -# -def ungetevent(event): - queue.insert(0, event) - - -# Synchronize the display. It turns out that this is the way to -# force STDWIN to call XSync(), which some (esoteric) applications need. -# (This is stronger than just flushing -- it actually waits for a -# positive response from the X server on the last command issued.) -# -def sync(): - while 1: - event = stdwin.pollevent() - if not event: break - queue.append(event) |