code: def get_one_file_in(dirname):
      
      files = os.listdir(dirname)
      if len(files) > 1:
          raise Failure('More than one file exists in %s:\n%s' %
                        (dirname, '\n'.join(sorted(files))))
      elif not files:
          raise Failure('No files found in %s' % dirname)
      return os.path.join(dirname, files[0])
docs: Return the pathname of the one file in a directory.
  
      Raises if the directory has no files or more than one file.