i have the simpliest way to revolve at a set distance from the parent/target of a camera.
def main(cont):
sens=cont.sensors[‘Mouse’];
lateX=sens.position[0]/180.
lateY=sens.position[1]/180.
cont.owner.localOrientation=mathutils.Vector((lateY/2,lateY/2,lateX))
but you have to have the camera parented and make track to a target.
and the sensor should be named Mouse by Default.