• Barry Warsaw's avatar
    Added support for RFC 959's REST command (restart), closing SF patch · 100d81e8
    Barry Warsaw yazdı
    #101187, which some modifications.  Specifically,
    
    ntransfercmd(), transfercmd(), and retrbinary() all grow an optional
    `rest' argument, which if not None, is used as the argument to an FTP
    REST comman dbefore the socket is returned.  Differences from the SF
    patch:
    
    - always compare against None with `is' or `is not' instead of == or !=
    
    - no parens around conditional
    
    - RFC 959 defines the argument to REST is a string containing any
      ASCII characters in the range [33..126].  Therefore, we use the %s
      format character instead of %f or %d as suggested in the patch's
      comments.  Note that we do /not/ sanity checkthe contents of the
      rest argument (but we'll document this in the library reference
      manual).
    100d81e8
ftplib.py 20.3 KB