import binascii


def hexlify_bksl(data):
    """Encode bytes into an hexadecimal string with backslashes"""
    hexstr = binascii.hexlify(data).decode('ascii')
    return ''.join('\\x' + hexstr[i:i + 2] for i in range(0, len(hexstr), 2))