Connecting logic blocks using python in 2.58?

I am working on a script that creates a large amount of objects, and in the same script I am trying to add a sensor, controller and actuator to each object. I have managed to create the logic blocks, but I cannot find any documentation on how to connect for instance the sensor to the controller and so on. Does anybody know how to do that?

Any help would be appreciated.

By the way, does anyone of you know when or if an extensive reference like the will be available for Blender 2.5?


Is this something for editing in general or while the game is running? If it’s the former, then the general python forum has more people with knowledge on Python use outside of the BGE API.

This should work:

bpy.ops.logic.sensor_add(type, name, object)[‘Name’].link([‘Name’])


Hope it helps

Beat me to it!

Thanks a lot Ex.!
It works perfectly.


Thank you for the information. Waiting for new info.