## Steps ##
1. downloader MediaIoBaseDownload(writer,
storage.objects().get_media()).next_chunk()
2. progress, done = downloader.next_chunk()
## Expected ##
The standard buffer pattern in python is as follows:
with open(path) as fp:
for buf in fp:
print buf
This works with open(), gfile.GFile(), requests.get(URL, stream=True),
urllib2.urlopen.
I would expect this to be something like:
with storage.objects().get_media() as fp:
for buf in fp:
# print fp.progress, fp.done
buffer.write(buf)
Specifically I think the following would be fantastic:
get_media returns an object with __enter__ and __exit__ values that create Downloader classes, which implement __iter__ for chunksize
## Version ##
linux, pip install google-api-python-client
Original issue reported on code.google.com by fe...@google.com on 8 Apr 2013 at 5:38
Original issue reported on code.google.com by
fe...@google.com
on 8 Apr 2013 at 5:38