Read a name file from the data directory

        :param filename: Name of the file to read.
        :return: A list of name entries.
769205
def _read_name_file(self, filename):
        
        file_path = os.path.join(self._DATA_DIR, filename)
        with open(file_path) as f:
            names = json.load(f)

        return names
968790
def read(self, filename):
        

        try:
            with open(filename, 'r') as _file:
                self._filename = filename
                self.readstream(_file)
            return True

        except IOError:
            self._filename = None
            return False
608294
def get_data_filename(filename):
    
    global _data_map

    if _data_map is None:
        _data_map = {}
        for root, dirs, files in os.walk(specdir):
            for fname in files:
                _data_map[fname] = os.path.join(root, fname)

    if filename not in _data_map:
        raise KeyError(filename + ' not found in ' + specdir)
    return _data_map[filename]
527043
def get_filenames_in_lipd(path, name=""):
    
    _filenames = []
    try:
        # in the top level, list all files and skip the "data" directory
        _top = [os.path.join(name, f) for f in os.listdir(path) if f != "data"]
        # in the data directory, list all files
        _dir_data = [os.path.join(name, "data", f) for f in os.listdir(os.path.join(path, "data"))]
        # combine the two lists
        _filenames = _top + _dir_data
    except Exception:
        pass
    return _filenames
357513
def get_names():
    
    return [n.strip() for n in codecs.open(os.path.join("data", "names.txt"),"rb",'utf8').readlines()]
1337280
public static FeatureList read(String filename) throws IOException {
		logger.info("Reading: {}", filename);

		FeatureList features = new FeatureList();
		BufferedReader br = new BufferedReader(new FileReader(filename));

		String s;
		for (s = br.readLine(); null != s; s = br.readLine()) {
			s = s.trim();

			if (s.length() > 0) {
				if (s.charAt(0) == '#') {
					//ignore comment lines
				} else {

					FeatureI f = parseLine(s);
					if (f != null) {
						features.add(f);
					}
				}
			}

		}

		br.close();
		return features;
	}
854005
def parse(self, filenames):
        
        filenames = list_strings(filenames)

        read_ok = []
        for fname in filenames:
            try:
                fh = open(fname)
            except IOError:
                logger.warning("Cannot open file %s" % fname)
                continue

            try:
                self._read(fh, fname)
                read_ok.append(fname)

            except self.Error as e:
                logger.warning("exception while parsing file %s:\n%s" % (fname, str(e)))
                continue

            finally:
                fh.close()

        # Add read_ok to the list of files that have been parsed.
        self._filenames.extend(read_ok)
        return read_ok
1182015
def getFilenames(self,pixels=None):
        
        logger.debug("Getting filenames...")
        if pixels is None:
            return self.filenames
        else:
            return self.filenames[np.in1d(self.filenames['pix'],pixels)]
185048
def read(self, filename):
        
        f = h5py.File(filename, "r")
        self.data = []
        for i in range(f['data'].attrs['length']):
            self.data.append(f['data']['data_' + str(i)].value)
        self.u = []
        for i in range(f['u'].attrs['length']):
            self.u.append(f['u']['u_' + str(i)].value)
        self.sigma = []
        for i in range(f['sigma'].attrs['length']):
            self.sigma.append(f['sigma']['sigma_' + str(i)].value)
        self.v = []
        for i in range(f['v'].attrs['length']):
            self.v.append(f['v']['v_' + str(i)].value)
        self.stachans = [tuple(stachan.decode('ascii').split('.'))
                         for stachan in f['stachans'].value]
        self.dimension = f['data'].attrs['dimension']
        self.filt_order = f['data'].attrs['filt_order']
        self.highcut = f['data'].attrs['highcut']
        self.lowcut = f['data'].attrs['lowcut']
        self.multiplex = bool(f['data'].attrs['multiplex'])
        self.sampling_rate = f['data'].attrs['sampling_rate']
        if isinstance(f['data'].attrs['name'], str):
            self.name = f['data'].attrs['name']
        else:
            self.name = f['data'].attrs['name'].decode('ascii')
        return self
1155967
def read(filename, data_wrapper=DataWrapper):
    ''''''
    data = np.loadtxt(filename)
    if len(np.shape(data)) == 1:
        data = np.reshape(data, (1, -1))
    data = data[:, [X, Y, Z, R, TYPE, ID, P]]
    return data_wrapper(data, 'SWC', None)
427226
def read(fname):
    '''
    
    '''
    file_path = os.path.join(SETUP_DIRNAME, fname)
    with codecs.open(file_path, encoding='utf-8') as rfh:
        return rfh.read()
335733
def file_to_list(file_name, file_location):
    
    file = __os.path.join(file_location, file_name)
    read_file = open(file, "r")
    temp_list = read_file.read().splitlines()
    read_file.close()
    return temp_list
504623
def read (self, filename=None):
    
    if filename is None:
      filename = self.pathname

    stream = open(filename, 'rb')
    magic  = struct.unpack('>H', stream.read(2))[0]
    stream.close()

    if magic == Seq.Magic:
      self.readBinary(filename)
    else:
      self.readText(filename)
492944
def read_files(*filenames):
    
    output = []
    for filename in filenames:
        f = codecs.open(filename, encoding='utf-8')
        try:
            output.append(f.read())
        finally:
            f.close()
    return '\n\n'.join(output)
513585
def _get_data(filenames):
    
    if filenames:
        data = ""
        for filename in filenames:
            with open(filename, "rb") as f:
                data += f.read()
    else:
        data = sys.stdin.read()

    return data
815576
def _read_file(self, filename):
        
        with open(filename, 'r') as stream:
            return self._read_stream(stream=stream)
1101461
def read_file(self, filename):
        
        self.pack = {}
        with open(filename, "r") as f:
            for line in f:
                line = line.strip()
                if (len(line) == 0) or (line[0] == "#"):
                    continue
                try:
                    self._parse_modulus(line)
                except:
                    continue