Read multiple ``CTfile`` formatted files.
    
    :param str path: Path to ``CTfile``. 
    :return: Subclass of :class:`~ctfile.ctfile.CTfile`.
    :rtype: :class:`~ctfile.ctfile.CTfile`
968693
def read_files(path, verbose=True):
    
    for filehandle in filehandles(path, verbose=verbose):
        yield CTfile.load(filehandle)
638486
def reader(path):
    
    p = subprocess.Popen(
        ['7z', 'e', '-so', path],
        stdout=subprocess.PIPE,
        stderr=file_open(os.devnull, "w")
    )
    return io.TextIOWrapper(p.stdout, encoding='utf-8',
                            errors='replace')
1121682
def __format_path(self, path):
        
        # Unicode strings are converted back to strings, because it seems
        # that inotify_add_watch from ctypes does not work well when
        # it receives an ctypes.create_unicode_buffer instance as argument.
        # Therefore even wd are indexed with bytes string and not with
        # unicode paths.
        if isinstance(path, unicode):
            path = path.encode(sys.getfilesystemencoding())
        return os.path.normpath(path)
665674
def read_lines(self, file_path, empty_lines=False, signal_ready=True):
        
        file_handler, file_id = self._get_file(file_path)
        file_handler.seek(0, os.SEEK_END)

        if signal_ready:
            self.signal_ready()

        while self.thread_server.is_alive():
            line = six.text_type(file_handler.readline(), "utf-8")
            if line:
                yield line
                continue
            elif empty_lines:
                yield line

            time.sleep(0.1)

            if file_id != self._get_file_id(os.stat(file_path)) and os.path.isfile(file_path):
                file_handler, file_id = self._get_file(file_path)
1931
def read(in_path):
    
    assert os.path.exists(in_path), "The following GRP file can't be found. in_path: {}".format(in_path)

    with open(in_path, "r") as f:
        lines = f.readlines()
        # need the second conditional to ignore comment lines
        grp = [line.strip() for line in lines if line and not re.match("^#", line)]

    return grp
379447
def inspect_file(path):
    
    with open(path, 'rb') as f:
        labels, count = inspect(tx.decode(line) for line in f)
    return labels, count
755817
def load(self, path):
        
        self.dct = wrapper.Dictionary()
        self.guide = wrapper.Guide()

        with open(path, 'rb') as f:
            self.dct.read(f)
            self.guide.read(f)

        return self
1026920
def read_file(file_path, **kws):
    
    kw = {"mode":"r", "encoding":"utf-8"}
    if kws:
        for k,v in kws.items():
            kw[k] = v
    with open(file_path, **kw) as afile:
        txt = afile.read()
    return txt
429266
def sub_files(path, invisible=False):
    
    files = [x for x in os.listdir(path) if os.path.isfile(os.path.join(path, x))]
    if not invisible:
        files = [x for x in files if not x.startswith('.')]

    return files
655031
def file_get_contents(self, path):
        

        with open(self.get_full_file_path(path), 'r') as f: return  f.read()
183274
def open_files(self, path):
        
        paths = []
        input_list = _patt.findall(path)
        if not input_list:
            input_list = [path]

        for path in input_list:
            # Strips trailing wildcard
            if path.endswith('*'):
                path = path[:-1]

            if os.path.isdir(path):
                continue

            self.logger.debug('Opening files matched by {0}'.format(path))
            info = iohelper.get_fileinfo(path)
            ext = iohelper.get_hdu_suffix(info.numhdu)
            files = glob.glob(info.filepath)  # Expand wildcard
            paths.extend(['{0}{1}'.format(f, ext) for f in files])

        if len(paths) > 0:
            self.load_paths(paths)
            return True

        return False
473082
def read(path):
    
    # This function implementation was chosen to be compatible across Python 2/3.
    f = open(path, 'rb')
    # We avoid use of the with keyword for Python 2.4 support.
    try:
        b = f.read()
    finally:
        f.close()

    return b.decode(FILE_ENCODING)
828514
def read_python(path):
    '''

    '''
    from six import exec_
    path = Path(path).absolute()
    assert path.is_file()
    with path.open('r') as f:
        contents = f.read()
    metadata = {}
    exec_(contents, {}, metadata)
    metadata = {k.lower(): v for (k, v) in metadata.items()}
    return metadata
922956
public List<String> readAllLines(Path path, Charset cs)
    {
        try {
            return Files.readAllLines(path, cs);
        } catch (IOException e) {
            return null;
        }
    }
1151445
def read_file(self, file_path):
        
        try:
            with open(self.p(file_path)) as fd:
                return fd.read()
        except IOError as ex:
            logger.error("error while accessing file %s: %r", file_path, ex)
            raise ConuException("There was an error while accessing file %s: %r", file_path, ex)
251974
def read_file(paths):
    

    if isinstance(paths, str):
        paths = [paths]

    re = {}
    for path in paths:
        cfg = yaml.load(open(path))
        merge(re, cfg)

    return re
1257947
def read_config(path):
    
    parser = _make_parser()
    if parser.read(path):
        return parser
    raise Exception("Failed to read {}".format(path))