#!/usr/bin/python
import time
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler

class MyHandler(FileSystemEventHandler):
	def on_modified(self, event):
		print "Got it!"


if __name__ =="__main__":
	event_handler= MyHandler()
	observer = Observer()
	observer.schedule(event_handler, path="/home/pi/datalogger/loggerconfigs", recursive=False)
	observer.start()

	try:
		while True:
			time.sleep(1)
	except KeyboardInterrupt:
		observer.stop()
	observer.join()
