Open a new ftp object.
518562
def _open_ftp(self):
        # type: () -> FTP
        
        _ftp = FTP()
        _ftp.set_debuglevel(0)
        with ftp_errors(self):
            _ftp.connect(self.host, self.port, self.timeout)
            _ftp.login(self.user, self.passwd, self.acct)
            self._features = {}
            try:
                feat_response = _decode(_ftp.sendcmd("FEAT"), "latin-1")
            except error_perm:  # pragma: no cover
                self.encoding = "latin-1"
            else:
                self._features = self._parse_features(feat_response)
                self.encoding = "utf-8" if "UTF8" in self._features else "latin-1"
                if not PY2:
                    _ftp.file = _ftp.sock.makefile(  # type: ignore
                        "r", encoding=self.encoding
                    )
        _ftp.encoding = self.encoding
        self._welcome = _ftp.welcome
        return _ftp
324291
def open(self):
        """"""
        with open(self.filename, 'rb') as file_open:
            binary = file_open.read()

        try:
            return binary.decode()
        except UnicodeDecodeError:
            encoding = get_encoding(binary)
            try:
                return binary.decode(encoding)
            except LookupError:
                return binary.decode(errors='ignore')
            except:  # pylint: disable=W0702
                open_error(self.filename)
        except:  # pylint: disable=W0702
            open_error(self.filename)
930730
def open(self):
        """"""

        self.hwman = HardwareManager(port=self._port)
        self.opened = True

        if self._connection_string is not None:
            try:
                self.hwman.connect_direct(self._connection_string)
            except HardwareError:
                self.hwman.close()
                raise

        elif self._connect_id is not None:
            try:
                self.hwman.connect(self._connect_id)
            except HardwareError:
                self.hwman.close()
                raise
1090228
def open(self, mode='r', buffering=-1, encoding=None,
             errors=None, newline=None):
        
        if self._closed:
            self._raise_closed()
        return FakeFileOpen(self.filesystem, use_io=True)(
            self._path(), mode, buffering, encoding, errors, newline)
544163
def open(self):
        """"""
        url = self.url
        try:
            request = urllib.request.Request(url)
            handle = urllib.request.build_opener()
        except IOError:
            return None
        return (request, handle)
735327
def open(self):
        """"""
        self._id = str(uuid.uuid4())
        self._client.open_connection(self._id, info=self._connection_args)
46865
private AFTPClient actionOpen() throws IOException, PageException {
	required("server", server);
	required("username", username);
	// required("password", password);

	AFTPClient client = getClient();
	writeCfftp(client);
	return client;
    }
30388
def open(self, filehandle):
        """"""
        with self.lock:
            if filehandle in self.files:
                self.files[filehandle] += 1
            elif filehandle.closed:
                filehandle.open()
                self.files[filehandle] = 1
                self.past.append(filehandle)
1001149
def open(self, new=1):
        
        import webbrowser
        webbrowser.open(self.url, new=new)
388257
def open(url):
    
    if sys.platform == 'win32':
        os.startfile(url)
    elif sys.platform == 'darwin':
        subprocess.Popen(['open', url])
    else:
        try:
            subprocess.Popen(['xdg-open', url])
        except OSError:
            import webbrowser
            webbrowser.open(url)
996272
def openfile(filename, mode="rt", *args, expanduser=False, expandvars=False,
             makedirs=False, **kwargs):
    """"""
    if filename in ("-", None):
        return sys.stdin if "r" in mode else sys.stdout
    if expanduser:
        filename = os.path.expanduser(filename)
    if expandvars:
        filename = os.path.expandvars(filename)
    if makedirs and ("a" in mode or "w" in mode):
        parentdir = os.path.dirname(filename)
        if not os.path.isdir(parentdir):
            os.makedirs(parentdir)
    if filename.endswith(".gz"):
        if gzip is None:
            raise NotImplementedError
        _open = gzip.open
    elif filename.endswith(".bz2"):
        if bz2 is None:
            raise NotImplementedError
        _open = bz2.open
    elif filename.endswith(".xz") or filename.endswith(".lzma"):
        if lzma is None:
            raise NotImplementedError
        _open = lzma.open
    else:
        _open = open
    return _open(filename, mode, *args, **kwargs)
64324
function open(file) {
  if (!file) {
    console.log('No output file, force logging to console')
    config.logToConsole = true
    return
  }
  if (fs.existsSync(file)) {
    var suffix = (new Date()).toJSON()//(new Date()).getTime()
    var newfile = file+'.'+suffix
    console.log('Move datafile to', newfile)
    fs.renameSync(file, newfile)
  }
  dataFile = new DataFile(file)
}
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
191396
def open( self ):
        """"""
        if self._connection is None:
            self._connection = sqlite3.connect(self._dbfile)
385366
def open_notebook(self, filenames=None):
        """"""
        if not filenames:
            filenames, _selfilter = getopenfilenames(self, _("Open notebook"),
                                                     '', FILES_FILTER)
        if filenames:
            for filename in filenames:
                self.create_new_client(filename=filename)
795412
def Open(self, file_object):
    
    self._file_object = file_object
    self._regf_file.open_file_object(self._file_object)
    return True
746365
def _open(file_, mode='r'):
  """"""
  if isinstance(file_, string_types):
    _, ext = path.splitext(file_)
    if ext in {'.bz2', '.gz'}:
      s = tarfile.open(file_)
      return s.extractfile(s.next())
    else:
      return open(file_, mode)
  return file_