Projects/pensieve
Projects
/
pensieve
Archived
3
0
Fork 0
This repository has been archived on 2024-08-06. You can view files and clone it, but cannot push or open issues or pull requests.
pensieve/blueDart.py

39 lines
791 B
Python
Raw Normal View History

#!/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()