def schedule_tricks(observer, tricks, pathname, recursive):
 for trick in tricks:
  for (name, value) in list(trick.items()):
   TrickClass = load_class(name)
   handler = TrickClass(**value)
   trick_pathname = (getattr(handler, 'source_directory', None) or pathname)
   observer.schedule(handler, trick_pathname, recursive)

def schedule_tricks ( observer , tricks , pathname , recursive ) : for trick in tricks : for ( name , value ) in list ( trick . items ( ) ) : TrickClass = load_class ( name ) handler = TrickClass ( ** value ) trick_pathname = ( getattr ( handler , 'source_directory' , None ) or pathname ) observer . schedule ( handler , trick_pathname , recursive )
schedules tricks with the specified observer and for the given watch path .