Open the SIGRES file located in the in self.outdir.
        Returns :class:`SigresFile` object, None if file could not be found or file is not readable.
2440
def open_sigres(self):
        
        sigres_path = self.sigres_path

        if not sigres_path:
            logger.critical("%s didn't produce a SIGRES file in %s" % (self, self.outdir))
            return None

        # Open the SIGRES file and add its data to results.out
        from abipy.electrons.gw import SigresFile
        try:
            return SigresFile(sigres_path)
        except Exception as exc:
            logger.critical("Exception while reading SIGRES file at %s:\n%s" % (sigres_path, str(exc)))
            return None
588880
def _openFile(self):
        
        if self.filename is not None:
            self.h5 = h5py.File(self.filename)
        else:
            return

        if 'bp' not in self.h5:
            self.h5.create_group('bp')

        if 'bps' not in self.h5:
            self.h5.create_group('bps')

        for bp_type in ['bp', 'bps']:
            for bp_num in self.data[bp_type]:

                # Create group in case if new hdf5 file is opened
                if bp_num not in self.h5[bp_type]:
                    self.h5[bp_type].create_group(bp_num)

                # Sync data if old file is opened
                for parameters in self.h5[bp_type][bp_num]:
                    self.data[bp_type][bp_num][parameters] = self.h5[bp_type][bp_num][parameters]

        if 'mask' in self.h5:
            self.mask = self.h5['mask'][:]

        if 'time' in self.h5:
            self.time = self.h5['time'][:]

        if 'num_bp' in self.h5.attrs:
            self.num_bp = self.h5.attrs['num_bp']
        else:
            self.h5.attrs['num_bp'] = self.num_bp

        if 'num_step' in self.h5.attrs:
            self.num_step = self.h5.attrs['num_step']
        else:
            self.h5.attrs['num_step'] = self.num_step

        if 'startBP' in self.h5.attrs:
            self.startBP = self.h5.attrs['startBP']
        else:
            self.h5.attrs['startBP'] = self.startBP
743707
def open(cls, filename, crs=None):
        
        with fiona.Env():
            with fiona.open(filename, 'r') as source:
                original_crs = CRS(source.crs)
                schema = source.schema
                length = len(source)
        crs = crs or original_crs
        ret_val = cls(filename, crs, schema, length)
        return ret_val
312862
def OpenFile(self, filename):
    """"""
    (mime_type, encoding) = mimetypes.guess_type(filename)
    assert mime_type
    # A crude guess of when we should use binary mode. Without it non-unix
    # platforms may corrupt binary files.
    if mime_type.startswith('text/'):
      mode = 'r'
    else:
      mode = 'rb'
    return open(os.path.join(self.server.file_dir, filename), mode), mime_type
894024
def open(self, mode='rb'):
        
        fs, path = self._get_fs()
        return fs.open(path, mode=mode)
1069646
def OpenFile(self, windows_path):
    
    path_spec = self._path_resolver.ResolvePath(windows_path)
    if path_spec is None:
      return None

    return self._file_system.GetFileObjectByPathSpec(path_spec)
1228502
def open(self, mode=None):
        

        if mode is None:
            mode = self.mode
        elif mode not in ['r', 'w', 'a']:
            raise ValueError('Invalid mode! Modes: [\'a\', \'r\', \'w\']')

        if self._file is None:
            self._file = h5py.File(self.path, mode=mode)
786639
def open(self, fp, mode='r'):
        
        self._file = open(fp, mode=mode)
        return self._file
481263
async def open(self) -> 'Tails':
        

        LOGGER.debug('Tails.open >>>')

        self._reader_handle = await blob_storage.open_reader('default', self._tails_config_json)

        LOGGER.debug('Tails.open <<<')
        return self
645188
def open(self, file, mode='r', buffering=-1, encoding=None,
             errors=None, newline=None, closefd=True, opener=None):
        
        if opener is not None and sys.version_info < (3, 3):
            raise TypeError(
                "open() got an unexpected keyword argument 'opener'")
        fake_open = FakeFileOpen(self.filesystem, use_io=True)
        return fake_open(file, mode, buffering, encoding, errors,
                         newline, closefd, opener)
831590
def open(self, _file, target=DEFAULT_TARGET):
        
        # Close any existing BFD structure instance. 
        self.close()

        #
        # STEP 1. Open the BFD pointer.
        #
        # Determine if the user passed a file-descriptor or a _file and
        # proceed accordingly.
        if type(_file) is FileType:
            # The user specified a file descriptor.
            filename = _file.name

            if islink(filename):
                raise BfdException("Symlinks file-descriptors are not valid")
                    
            try:
                self._ptr = _bfd.fdopenr(filename, target, dup(_file.fileno()))
            except Exception, err:
                raise BfdException(
                    "Unable to open file-descriptor %s : %s" % (filename, err))

        elif type(_file) is StringType:
            # The user spcified a filaname so first check if file exists.
            filename = _file
            try:
                with open(_file): pass
            except IOError:
                raise BfdException("File %s does not exist." % filename)

            #
            # Proceed to open the specified file and create a new BFD.
            #
            try:
                self._ptr = _bfd.openr(filename, target)
            except (TypeError, IOError), err:
                raise BfdException(
                    "Unable to open file %s : %s" % (filename, err))

        elif type(_file) is IntType:
            # The user specified an already-open BFD pointer so we avoid any
            # further open operation and move on to file format recognition.
            self._ptr = _file

        else:
            raise BfdException(
                "Invalid file type specified for open operation (%r)" % _file)

        #
        # STEP 2. Determine file format of the BFD.
        #
        # Now that the BFD is open we'll proceed to determine its file format.
        # We'll use the objdump logic to determine it and raise an error in
        # case we were unable to get it right.
        #
        try:
            # Type opening it as an archieve and if it success then check
            # subfiles.
            if _bfd.check_format(self._ptr, BfdFormat.ARCHIVE):
                # Set current format and store the inner file list.
                self.file_format = BfdFormat.ARCHIVE

                self.__populate_archive_files()
            else:
                # DO NOT USE bfd_check_format_matches() becuase its not tested.
                # An implementation example if on objdump.c at function
                # display_bfd().
                if _bfd.check_format(self._ptr, BfdFormat.OBJECT):
                    self.file_format = BfdFormat.OBJECT

                elif _bfd.check_format(self._ptr, BfdFormat.CORE):
                    self.file_format = BfdFormat.CORE

                else:
                    pass
                    raise BfdException(_bfd.get_last_error_message())

        except TypeError, err:
            raise BfdException(
                "Unable to initialize file format : %s" % err)

        #
        # STEP 3. Extract inner sections and symbolic information.
        #
        if self._ptr is not None:
            # If the file is a valid BFD file format but not an archive then
            # get its sections and symbolic information (if any).
            if self.file_format in [BfdFormat.OBJECT, BfdFormat.CORE]:
                self.__populate_sections()
                self.__populate_symbols()
986047
def open(cls, path, jpeg_quality=75):
        ""
        filename = fspath(path)

        p_compdata = ffi.new('L_COMP_DATA **')
        result = lept.l_generateCIDataForPdf(
            os.fsencode(filename), ffi.NULL, jpeg_quality, p_compdata
        )
        if result != 0:
            raise LeptonicaError("CompressedData.open")
        return CompressedData(p_compdata[0])
583357
def open(self, filename, mode='r', **kwargs):
        '''
        
        '''
        if 'r' in mode and not self.backend.exists(filename):
            raise FileNotFound(filename)
        return self.backend.open(filename, mode, **kwargs)
1020500
def open(self, mode='rb'):
        
        file = self.storage.open(self.relative_name, mode=mode)  # type: File
        return file
1259212
def open_file(self, fname, length=None, offset=None, swap=None, block=None, peek=None):
        '''
        
        '''
        if length is None:
            length = self.length
        if offset is None:
            offset = self.offset
        if swap is None:
            swap = self.swap_size

        return binwalk.core.common.BlockFile(fname,
                                             subclass=self.subclass,
                                             length=length,
                                             offset=offset,
                                             swap=swap,
                                             block=block,
                                             peek=peek)
17104
def open_hist(self):
        
        if not self.hist_path:
            if self.status == self.S_OK:
                logger.critical("%s reached S_OK but didn't produce a HIST file in %s" % (self, self.outdir))
            return None

        # Open the HIST file
        from abipy.dynamics.hist import HistFile
        try:
            return HistFile(self.hist_path)
        except Exception as exc:
            logger.critical("Exception while reading HIST file at %s:\n%s" % (self.hist_path, str(exc)))
            return None
164317
def open_asset_path(self, *args, **kwargs):
        
        f = self.asset_path_le.text()
        d = os.path.dirname(f)
        osinter = get_interface()
        osinter.open_path(d)