import pickle


def unpickler(path):

    """ Unpickle a log file containing several pickled objects.
    Returns a generator to iterate over.

    Arguments:
    ----------
    path = str or Path-like
        The absolute path to the log file.
    """

    try:

        with open(path, 'rb') as _log_:
            while True:
                try:
                    _obj_ = pickle.load(_log_)
                    yield _obj_
                except EOFError:
                    break
    except IOError:
         return None