def chunker(reader, width):
    """Yield chunks from lines in reader with given width."""
    for line in reader:
        line = line[:-1]
        if line == '':
            yield ''
            continue
        for offset in range(0, len(line), width):
            yield line[offset:offset + width]
