equal
deleted
inserted
replaced
948 buf += chunk[:left] |
948 buf += chunk[:left] |
949 else: |
949 else: |
950 buf += chunk |
950 buf += chunk |
951 |
951 |
952 return buf |
952 return buf |
953 |
953 |
954 def filechunkiter(f, size=65536, limit=None): |
954 def filechunkiter(f, size=65536, limit=None): |
955 """Create a generator that produces the data in the file size |
955 """Create a generator that produces the data in the file size |
956 (default 65536) bytes at a time, up to optional limit (default is |
956 (default 65536) bytes at a time, up to optional limit (default is |
957 to read all data). Chunks may be less than size bytes if the |
957 to read all data). Chunks may be less than size bytes if the |
958 chunk is the last chunk in the file, or the file is a socket or |
958 chunk is the last chunk in the file, or the file is a socket or |