create and modify actuators from script

Hey… I was wondering if it is possible to create and modify actuators and sensors from script? In general, is it possible to do the same stuff you can do with logic bricks but from python script?

you can do the following:

>>> bpy.ops.logic.
                  actuator_add(
                  actuator_move(
                  actuator_remove(
                  controller_add(
                  controller_move(
                  controller_remove(
                  links_cut(
                  properties(
                  sensor_add(
                  sensor_move(
                  sensor_remove(
                  texface_convert(

But modifying via py console or run script seems impossible, as bge module stuff isn’t exposed to blender (only available while game engine is running if i understood it right…)

The bricks can be added with operators listed by Codemanx.

The bricks can be addressed from the game property.


>> C.object.game.
                  actuators
                  as_pointer(
                  bl_rna
                  callback_add(
                  callback_remove(
                  collision_bounds_type
                  collision_margin
                  controllers
                  damping
                  ...

The actuators, sensors can be addressed using


>>> C.object.game.actuators['fire'].
                                    action
                                    apply_to_children
                                    as_pointer(
                                    bl_rna
                                    callback_add(
                                    callback_remove(
                                    driver_add(
                                    driver_remove(
                                    frame_blend_in