def readcb_fh(count, hook):
    """A callback for data.  hook should be a Python file-like object."""
    if count:
        return hook.read(count)
    else:
        if not hasattr(hook, 'seek'):
            return None
        hook.seek(0, 0)
        return None
