From 620a8e229a15a632a302ff5b69422ac0b2e31b34 Mon Sep 17 00:00:00 2001 From: mfrasca <> Date: Wed, 17 Jan 2007 17:02:51 +0000 Subject: [PATCH] adding pywmnop.py and renaming pywmPhoto.py to pywmphoto.py. --- examples/pywmnop.py | 35 +++++++++++++++++++++++++ examples/{pywmPhoto.py => pywmphoto.py} | 4 +-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 examples/pywmnop.py rename examples/{pywmPhoto.py => pywmphoto.py} (97%) diff --git a/examples/pywmnop.py b/examples/pywmnop.py new file mode 100644 index 0000000..469e523 --- /dev/null +++ b/examples/pywmnop.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python + +"""pywmnop.py + +WindowMaker dockapp doing nothing + +Copyright (C) 2006 Mario Frasca + +Licensed under the GNU General Public License. +""" + +import sys, time +import wmdocklib + +def checkForEvents(): + event = wmdocklib.getEvent() + while not event is None: + if event['type'] == 'destroynotify': + sys.exit(0) + event = wmdocklib.getEvent() + +def mainLoop(): + while 1: + checkForEvents() + wmdocklib.redraw() + time.sleep(0.5) + +def main(): + wmdocklib.initPixmap() + wmdocklib.openXwindow(sys.argv, 64, 64) + + mainLoop() + +if __name__ == '__main__': + main() diff --git a/examples/pywmPhoto.py b/examples/pywmphoto.py similarity index 97% rename from examples/pywmPhoto.py rename to examples/pywmphoto.py index 7697ad3..b09a91e 100644 --- a/examples/pywmPhoto.py +++ b/examples/pywmphoto.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -"""pywmPhoto.py +"""pywmphoto.py WindowMaker dockapp that displays a static xpm @@ -13,7 +13,7 @@ Changes: 2006-10-27 Mario Frasca First workingish version """ -usage = """pywmPhoto.py [options] +usage = """pywmphoto.py [options] Available options are: -h, --help print this help -f, --file set the xpm name