Connecting logic blocks using python in 2.58?

Hi,
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 http://www.blender.org/documentation/248PythonDoc/ will be available for Blender 2.5?

Thanks
Kristoffer

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:

[/QUOTE]
bpy.ops.logic.sensor_add(type, name, object)
bpy.context.active_object.game.controllers[‘Name’].link(bpy.context.active_object.game.sensors[‘Name’])

[QUOTE]

Hope it helps
Ex.

Beat me to it!

Thanks a lot Ex.!
It works perfectly.

Best
Kristoffer

Thank you for the information. Waiting for new info.