def load_in_chunks(path, chunk_size=1024):
    'Lazy function (generator) to read a file piece by piece.\n    Default chunk size: 1k.'
    with open(path, 'rb') as file_object:
        while True:
            data = file_object.read(chunk_size)
            if (not data):
                break
            (yield data)
Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k.
def load_in_chunks(path, chunk_size=1024):
    'Lazy function (generator) to read a file piece by piece.\n    Default chunk size: 1k.'
    with open(path, 'rb') as file_object:
        while True:
            data = file_object.read(chunk_size)
            if (not data):
                break
            (yield data)