code: def set_outdir(self):
          
          dirname = self.w.outdir.get_text()
          if os.path.isdir(dirname):
              self.outdir = dirname
              self.logger.debug('Output directory set to {0}'.format(self.outdir))
          else:
              self.w.outdir.set_text(self.outdir)
              self.logger.error('{0} is not a directory'.format(dirname))
docs: Set output directory.