(self, cmd, callback, blocksize=8192, rest=None)
return self.voidresp()
Retrieve data in binary mode.  A new port is created for you.

        Args:
          cmd: A RETR command.
          callback: A single parameter callable to be called on each
                    block of data read.
          blocksize: The maximum number of bytes to read from the
                     socket at one time.  [default: 8192]
          rest: Passed to transfercmd().  [default: None]

        Returns:
          The response code.
Retrieve data in binary mode.  A new port is created for you.
Retrieve data in binary mode . A new port is created for you .
def retrbinary(self, cmd, callback, blocksize=8192, rest=None):
        """Retrieve data in binary mode.  A new port is created for you.

        Args:
          cmd: A RETR command.
          callback: A single parameter callable to be called on each
                    block of data read.
          blocksize: The maximum number of bytes to read from the
                     socket at one time.  [default: 8192]
          rest: Passed to transfercmd().  [default: None]

        Returns:
          The response code.
        """
        self.voidcmd('TYPE I')
        conn = self.transfercmd(cmd, rest)
        while 1:
            data = conn.recv(blocksize)
            if not data:
                break
            callback(data)
        conn.close()
        return self.voidresp()
def retrbinary ( self , cmd , callback , blocksize = 8192 , rest = None ) : self . voidcmd ( 'TYPE I' ) conn = self . transfercmd ( cmd , rest ) while 1 : data = conn . recv ( blocksize ) if not data : break callback ( data ) conn . close ( ) return self . voidresp ( )