Driven shape keys and other stuff

I am working on a rig constructed entirely in python, and have encountered some problems:

  1. IK/FK switch, i.e. driving constraint influence by a bone.
  2. Driving shape keys by bones (the shapes themselves work fine).
  3. Display objects for bones in wireframe, i.e. how to press the W button.

Does anyone know how to do this from python?