This is on Ubuntu 13.10, with Docker 0.10.0:
Python 2.7.5+ (default, Sep 19 2013, 13:48:49)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import docker.client
>>> client = docker.Client()
>>> stream = client.pull('busybox', stream=True)
>>> chunks = [chunk for chunk in stream]
>>> len(chunks)
2
>>> chunks[0]
'{"status":"Pulling repository busybox"}'
>>> len(chunks[1])
22721
Basically chunks[0] is one line of the stream, and chunks[1] is every other line of the stream, concatenated. (I can take a look at making a PR for this tomorrow, if you'd like.)
This is on Ubuntu 13.10, with Docker 0.10.0:
Basically
chunks[0]is one line of the stream, andchunks[1]is every other line of the stream, concatenated. (I can take a look at making a PR for this tomorrow, if you'd like.)