Change settings like 'limit selection to visible' or 'trackball rotation' with python
Switch MMB with SHIFTMMB

view3d_km = bpy.context.window_manager.keyconfigs['Blender'].keymaps['3D View']
view3d_km.keymap_items['view3d.rotate'].map_type = 'MOUSE'
view3d_km.keymap_items['view3d.rotate'].type = 'MIDDLEMOUSE'
view3d_km.keymap_items['view3d.rotate'].shift = True

Turn on trackball rotation for MMB

bpy.context.user_preferences.inputs.view_rotate_method = 'TRACKBALL'

Disable Limit selection to visible

for scr in bpy.data.screens:
    for area in scr.areas:
        for space in area.spaces:
            if space.type == 'VIEW_3D':
                space.use_occlude_geometry = True