Added RoutineRunner class

This commit is contained in:
Balthasar Reuter
2015-06-18 23:59:42 +02:00
parent 80bb1bb301
commit 72cb88e9ef

View File

@@ -3,6 +3,7 @@
import os
from time import sleep
import subprocess
from gui import GUI_PyGame as GuiModule
@@ -19,10 +20,23 @@ directory = "2015-06-18"
# Display time for slideshow pictures
display_time = 3
# Waiting time between synchronizations
sync_time = 60
###############
### Classes ###
###############
class RoutineRunner:
def __init__(self, cmd):
self.cmd = cmd
def run(self, interval):
while True:
subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
sleep(interval)
class Slideshow:
def __init__(self, display_size, display_time, directory, recursive=True):
self.directory = directory