Read EPW weather data from path.

        Args:
            path (str): path to read weather data from
181342
def read(self, path):
        
        with open(path, "r") as f:
            for line in f:
                line = line.strip()
                match_obj_name = re.search(r"^([A-Z][A-Z/ \d]+),", line)
                if match_obj_name is not None:
                    internal_name = match_obj_name.group(1)
                    if internal_name in self._data:
                        self._data[internal_name] = self._create_datadict(
                            internal_name)
                        data_line = line[len(internal_name) + 1:]
                        vals = data_line.strip().split(',')
                        self._data[internal_name].read(vals)
                else:
                    wd = WeatherData()
                    wd.read(line.strip().split(','))
                    self.add_weatherdata(wd)
146166
def read_version(path):
    
    version = None
    if os.path.exists(path):
        version = open(path, 'r', encoding='utf-8').read().strip()

    if version:
        return re.sub(r'^python-', '', version)

    return version
1342032
def _read_value(path):
    
    read_value = 0
    if not os.path.exists(path):
        # Path will generally only exist on a Raspberry Pi
        pass
    else:
        with open(path) as f:
            read_value = int(f.read())
    return read_value
566771
def read_raw(data_path):
    
    with open(data_path, 'rb') as f:
        data = pickle.load(f)
    return data
814509
public static String readResourceAsStream(String path) {
        try {
            InputStream inputStream = ResourceUtil.getResourceAsStream(path);
            return ResourceUtil.readFromInputStreamIntoString(inputStream);
        } catch (Exception e) {
            throw new DataUtilException("Failed to load resource", e);
        }
    }
182026
def read(path, options = {})
      headers = extract_headers!(options)
      json = client.get("/v1/#{encode_path(path)}", {}, headers)
      return Secret.decode(json)
    rescue HTTPError => e
      return nil if e.code == 404
      raise
    end
1070404
def read_sps(path):
    

    for line in open(path):
        # parse x
        xs = line.rstrip().split(' ')

        yield xs[1:], int(xs[0])
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)
1028310
def read(self, path, base=None):
        ''''''
        if base == None:
            base = os.getcwd()
        absolute = os.path.abspath(path)
        if os.path.isfile(absolute):
            # Load that particular file
            logger.info('Loading %s' % absolute)
            self.extend(Task.load(path, base))
        elif os.path.isdir(absolute):
            # Walk this directory looking for tasks
            tasks = []
            for root, _, files in os.walk(absolute):
                files = [f for f in files if f.endswith('.py')]
                for child in files:
                    absolute = os.path.join(root, child)
                    logger.info('Loading %s' % absolute)
                    tasks.extend(Task.load(absolute, base))
            self.extend(tasks)
549558
def load_config(path):
    
    args = []
    with open(path, 'r') as fp:
        for line in fp.readlines():
            if line.strip() and not line.startswith("#"):
                args.append(line.replace("\n", ""))

    return args
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')
391111
def read_text_from_file(path: str) -> str:
    
    with open(path) as text_file:
        content = text_file.read()

    return content
112613
def reader_from_path(cls, path):
        
        context = FilePathContext(path)
        try:
            with open(context.filepath, 'r') as f:
                return ModelReader(f, context)
        except IOError:
            # Try to open the default file
            for filename in cls.DEFAULT_MODEL:
                try:
                    context = FilePathContext(
                        os.path.join(path, filename))
                    with open(context.filepath, 'r') as f:
                        return ModelReader(f, context)
                except:
                    logger.debug('Failed to load model file',
                                 exc_info=True)

        # No model could be loaded
        raise ParseError('No model file could be found ({})'.format(
            ', '.join(cls.DEFAULT_MODEL)))
354097
async function read(path) {
  const rs = createReadStream(path)
  /** @type {string} */
  const res = await collect(rs)
  return res
}
1136170
def read_file(self, path, **kwargs):
        
        # TODO support JSON here
        # TODO sphinx way of reporting errors in logs?

        parser_command = ["godocjson"]

        _ignore = kwargs.get("ignore")
        if _ignore:
            parser_command.extend(["-e", "{0}".format("|".join(_ignore))])

        parser_command.append(path)

        try:
            parsed_data = json.loads(subprocess.check_output(parser_command))
            return parsed_data
        except IOError:
            LOGGER.warning("Error reading file: {0}".format(path))
        except TypeError:
            LOGGER.warning("Error reading file: {0}".format(path))
        return None
1305717
def open(cls, path):
        
        filename = fspath(path)
        with _LeptonicaErrorTrap():
            return cls(lept.pixRead(os.fsencode(filename)))
1219591
def read(path, saltenv='base'):
    '''
    
    '''
    # Return a dict of paths + content
    ret = []
    files = find(path, saltenv)
    for fn_ in files:
        full = next(six.iterkeys(fn_))
        form = fn_[full]
        if form == 'txt':
            with salt.utils.files.fopen(full, 'rb') as fp_:
                ret.append(
                    {full: salt.utils.stringutils.to_unicode(fp_.read())}
                )
    return ret