def open(self):
        """This is the only way to open a file resource."""

        self.__sf = _sftp_open(self.__sftp_session_int, 
                               self.__filepath, 
                               self.access_type_int, 
                               self.__create_mode)

        if self.access_type_is_append is True:
            self.seek(self.filesize)

        return SftpFileObject(self)
def open ( self ) : self . __sf = _sftp_open ( self . __sftp_session_int , self . __filepath , self . access_type_int , self . __create_mode ) if self . access_type_is_append is True : self . seek ( self . filesize ) return SftpFileObject ( self )
This is the only way to open a file resource.