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


class MyHandler(FileSystemEventHandler):

    def on_created(self, event):
        print event.src_path


if __name__ == "__main__":
    event_handler = MyHandler()
    observer = Observer()
    observer.schedule(
        event_handler, path='/home/farsheed/Public/Desktop/mytest', recursive=False)
    observer.start()

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