Attempts to open the given files using the preferred desktop viewer or editor.

  :raises :class:`OpenError`: if there is a problem opening any of the files.
507714
def ui_open(*files):
  
  if files:
    osname = get_os_name()
    opener = _OPENER_BY_OS.get(osname)
    if opener:
      opener(files)
    else:
      raise OpenError('Open currently not supported for ' + osname)
333631
def open_closed_files(self):
        
        if not self.can_open_more_files:
            # If we can't open any more files. Close all of the files.
            self.close_all_files()

        files_with_no_updates = []
        while len(self.closed_file_infos) > 0:
            if (len(self.open_file_infos) >=
                    ray_constants.LOG_MONITOR_MAX_OPEN_FILES):
                self.can_open_more_files = False
                break

            file_info = self.closed_file_infos.pop(0)
            assert file_info.file_handle is None
            # Get the file size to see if it has gotten bigger since we last
            # opened it.
            try:
                file_size = os.path.getsize(file_info.filename)
            except (IOError, OSError) as e:
                # Catch "file not found" errors.
                if e.errno == errno.ENOENT:
                    logger.warning("Warning: The file {} was not "
                                   "found.".format(file_info.filename))
                    self.log_filenames.remove(file_info.filename)
                    continue
                raise e

            # If some new lines have been added to this file, try to reopen the
            # file.
            if file_size > file_info.size_when_last_opened:
                try:
                    f = open(file_info.filename, "r")
                except (IOError, OSError) as e:
                    if e.errno == errno.ENOENT:
                        logger.warning("Warning: The file {} was not "
                                       "found.".format(file_info.filename))
                        self.log_filenames.remove(file_info.filename)
                        continue
                    else:
                        raise e

                f.seek(file_info.file_position)
                file_info.filesize_when_last_opened = file_size
                file_info.file_handle = f
                self.open_file_infos.append(file_info)
            else:
                files_with_no_updates.append(file_info)

        # Add the files with no changes back to the list of closed files.
        self.closed_file_infos += files_with_no_updates
184110
protected void openFileMenuBar() {
		List<BoofSwingUtil.FileTypes> types = new ArrayList<>();
		if( allowImages )
			types.add(BoofSwingUtil.FileTypes.IMAGES);
		if( allowVideos )
			types.add(BoofSwingUtil.FileTypes.VIDEOS);
		BoofSwingUtil.FileTypes array[] = types.toArray(new BoofSwingUtil.FileTypes[0]);

		File file = BoofSwingUtil.openFileChooser(DemonstrationBase.this,array);
		if (file != null) {
			openFile(file);
		}
	}
578485
protected void openFileChooser()
   {
      if (m_model.getShowDialog())
      {
         if (m_fileChooser.showSaveDialog(m_parent) == JFileChooser.APPROVE_OPTION)
         {
            FileNameExtensionFilter filter = (FileNameExtensionFilter) m_fileChooser.getFileFilter();
            String description = filter.getDescription();
            m_model.setType(description.substring(0, description.indexOf(' ')));
            m_model.setFile(null);
            m_model.setFile(m_fileChooser.getSelectedFile());
         }
         m_model.setShowDialog(false);
      }
   }
1288715
def _openResources(self):
        
        logger.info("Opening: {}".format(self._fileName))
        self._h5Group = h5py.File(self._fileName, 'r')
232501
def open_rejects(file)
      # Make the parent directory.
      FileUtils.mkdir_p(File.dirname(file))
      # Open the file.
      FasterCSV.open(file, 'w', :headers => true, :header_converters => :symbol, :write_headers => true)
    end
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)
1119213
def open(self, fnames=None):
        """"""
        if fnames is None:
            fnames = self.get_selected_filenames()
        for fname in fnames:
            if osp.isfile(fname) and encoding.is_text_file(fname):
                self.parent_widget.sig_open_file.emit(fname)
            else:
                self.open_outside_spyder([fname])
466945
def open(self, *args, **kwargs):
        
        args, kwargs = self.__process__(*args, **kwargs)
        return Popen(args, **kwargs)
1320726
def open_window(path):
    """"""
    if 'pathlib' in modules:
        try:
            call(["open", "-R", str(Path(str(path)))])
        except FileNotFoundError:
            Popen(r'explorer /select,' + str(Path(str(path))))
    else:
        print('pathlib module must be installed to execute open_window function')
1063745
def open(self, mode='r', buffering=-1, encoding=None,
             errors=None, newline=None):
        
        if mode != 'r' or buffering != -1 or encoding or errors or newline:
            raise NotImplementedError('Only the default open() ' +
                                      'arguments are supported')

        return self._accessor.open(self)
967942
def open_file(name, mode=None, driver=None, libver=None, userblock_size=None, **kwargs):
    
    import sys
    import os
    from h5py import h5p
    from h5py._hl import files

    try:
        # If the byte string doesn't match the default
        # encoding, just pass it on as-is.  Note Unicode
        # objects can always be encoded.
        name = name.encode(sys.getfilesystemencoding())
    except (UnicodeError, LookupError):
        pass
    exists = os.path.exists(name)
    try:
        fcpl = h5p.create(h5p.FILE_CREATE)
        fcpl.set_link_creation_order(
            h5p.CRT_ORDER_TRACKED | h5p.CRT_ORDER_INDEXED)
    except AttributeError:
        # older version of h5py
        fp = files.File(name, mode=mode, driver=driver,
                        libver=libver, **kwargs)
    else:
        fapl = files.make_fapl(driver, libver, **kwargs)
        fp = files.File(files.make_fid(name, mode, userblock_size, fapl, fcpl))

    if not exists and fp.mode == 'r+':
        set_attributes(fp,
                       arf_library='python',
                       arf_library_version=__version__,
                       arf_version=spec_version)
    return fp
719664
def _openFile(self):
        

        file_types = "Comma Separated Values (*.csv);;Text files (*.txt);;All Files (*)"
        ret = QtGui.QFileDialog.getOpenFileName(self,
                                                self.tr('open file'),
                                                filter=file_types)

        if isinstance(ret, tuple):
            ret = ret[0] #PySide compatibility maybe?

        if ret:
            self._filenameLineEdit.setText(ret)
            self._updateFilename()
630138
function openFile(filename) {
  return new Promise((resolve, reject) => {
    opener(filename, null, err => err === null ? resolve(filename) : reject(err));
  });
}
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)
695639
def file(self, name, *args, **kwargs):
        
        return open(self(name), *args, **kwargs)
55857
def open(self, filename=None):
        '''
        
        '''
        if filename is None:
            address = self.address + 'tree'
        else:
            notebook_path = self.resource_filename(filename)
            if not notebook_path.isfile():
                raise IOError('Notebook path not found: %s' % notebook_path)
            else:
                address = '%snotebooks/%s' % (self.address, filename)
        webbrowser.open_new_tab(address)