Changing user preferences via console?
Got it.

bpy.context.user_preferences.inputs.use_mouse_emulate_3_button = True


It also says on the wiki that The Blender API can modify user preferences, keymaps and themes