how to change a pose lib using script
Whoops, now to setting the pose lib

Simple operator that takes the name of the poselib (action) you want to make active, and sets it on the active object

import bpy
from bpy.props import StringProperty

class SimpleOperator(bpy.types.Operator):
    """Change the Pose Lib"""
    bl_idname = "object.set_pose_lib"
    bl_label = "Set Pose Lib"
    name = StringProperty(options={'SKIP_SAVE'})

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        action = bpy.data.actions.get(self.name)
        if action:
            context.object.pose_library = action
        return {'FINISHED'}

def register():
    bpy.utils.register_class(SimpleOperator)

def unregister():
    bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
    register()


Example of usage

import bpy

def draw_button(self, context):        
    # change to a pose named "Pose"
    poselib = context.object.pose_library
    name = "PoseLib"
    op = self.layout.operator("object.set_pose_lib", text=name)
    op.name = name

bpy.types.DATA_PT_pose_library.append(draw_button)