def open_readable(self, name):
        """Open cur_dir/name for reading.

        Note: we read everything into a buffer that supports .read().

        Args:
            name (str): file name, located in self.curdir
        Returns:
            file-like (must support read() method)
        """
        # print("FTP open_readable({})".format(name))
        assert compat.is_native(name)
        out = SpooledTemporaryFile(max_size=self.MAX_SPOOL_MEM, mode="w+b")
        self.ftp.retrbinary(
            "RETR {}".format(name), out.write, FtpTarget.DEFAULT_BLOCKSIZE
        )
        out.seek(0)
        return out
def open_readable ( self , name ) : assert compat . is_native ( name ) out = SpooledTemporaryFile ( max_size = self . MAX_SPOOL_MEM , mode = "w+b" ) self . ftp . retrbinary ( "RETR {}" . format ( name ) , out . write , FtpTarget . DEFAULT_BLOCKSIZE ) out . seek ( 0 ) return out
Open cur_dir/name for reading.

        Note: we read everything into a buffer that supports .read().

        Args:
            name (str): file name, located in self.curdir
        Returns:
            file-like (must support read() method)