summaryrefslogtreecommitdiffstats
path: root/test/run.py
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-09-21 14:29:50 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@gmail.com>2012-09-21 14:29:50 +0200
commit6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea (patch)
tree1b37a1eb40ad1fdec0a2bebc167f7f8128497748 /test/run.py
parente6a6eb9aede59a1f7441b926b36afefd9c42b91d (diff)
parent9f262857d13a3e0d7ee214b33b90359c51227718 (diff)
downloadlibuca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.tar.gz
libuca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.tar.bz2
libuca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.tar.xz
libuca-6eaadaa0e4ad8ce906aa8ccee63d91f0d9cb28ea.zip
Merge branch 'plugins'
Diffstat (limited to 'test/run.py')
-rwxr-xr-xtest/run.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/test/run.py b/test/run.py
deleted file mode 100755
index 7982617..0000000
--- a/test/run.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env python
-
-import Tkinter
-import threading
-import subprocess
-
-class App(object):
- def __init__(self, parent):
- self.parent = parent
- self.canvas = Tkinter.Canvas(root, width=300, height=300)
- self.canvas.pack()
- self.rect = self.canvas.create_rectangle(0, 0, 300, 300, fill='yellow')
- self.run_button = Tkinter.Button(parent, text='Start grabbing', command=self.run_click)
- self.run_button.pack()
-
- def run_grab(self):
- proc = subprocess.Popen(['./grab'])
- proc.wait()
- self.canvas.itemconfig(self.rect, fill='red')
- self.run_button.config(state=Tkinter.NORMAL, text='Close', command=self.parent.destroy)
-
- def run_click(self):
- self.canvas.itemconfig(self.rect, fill='green')
- self.run_button.config(state=Tkinter.DISABLED)
- thread = threading.Thread(None, self.run_grab)
- thread.start()
-
-if __name__ == '__main__':
- root = Tkinter.Tk()
- app = App(root)
- root.mainloop()