Merge branch 'dev' of github.com:Programvareverkstedet/pensieve into dev

This commit is contained in:
Péter Gombos 2013-10-17 15:13:55 +02:00
commit 7d16718972

38
blueDart.py Executable file
View File

@ -0,0 +1,38 @@
#!/usr/bin/python
import os
import threading
import time
import Queue
import signal
import subprocess
import collections
q = Queue.Queue()
ls = collections.deque( ["5XTtUYV.jpg", "dwarfEntrance.png", "CD16E4u.jpg" ])
def showstuff():
while ( True ):
sb = subprocess.Popen(["feh", "-Z", "-g" ,"800x400",ls[0]])
while( True ):
a = q.get()
print a
if ( a == "stop" ):
sb.terminate()
exit()
elif ( a == "next"):
ls.rotate(1)
sb.terminate()
break
def amin():
showOff = threading.Thread(target=showstuff)
showOff.start()
for i in range(6):
time.sleep(5)
q.put("next")
time.sleep(2)
q.put("stop")
amin()