code: def execute(self):
          
          if self.direct:
              if self.file_type == 'pdf':
                  raise IOError(u"Direct output mode is not available for PDF "
                                 "export")
              else:
                  print(self.render().encode(self.encoding))
          else:
              self.write_and_log()
  
              if self.watch:
                  from landslide.watcher import watch
  
                  self.log(u"Watching %s\n" % self.watch_dir)
  
                  watch(self.watch_dir, self.write_and_log)
docs: Execute this generator regarding its current configuration.