logic bricks with python code

Hi to all!
I’m working with Blender 2.52.5 r’29631.
Does someone know how can I connect sensors, controllers and actuators via python code?
I have a python file called by a mouse event on a particular object.
This file dynamically create an object in the scene and then add to this object three sensors (Always, MouseOver and LeftButton), a controller (AND) and an actuator (Message).
How can I connect these 3 elements via python code?
Is there a way to do this?

There should be a python script controller where you enter the name of the script you want to use. Then connect it to the sensors and actuators it uses. It’s where ‘and’, ‘or’, and ‘xnor’ are.

Hi destray!
My problem is to connect with python code sensors and actuators.
I create an object in the scene and then I add to this, sensors, controller and actuators with python code.
So this object have the logic bricks but these aren’t connected.
I hope that I have explained it well!

explained very well! But there seems to be only a function to : disconnectbpy.ops.logic.links_cut. :frowning:
This can help? http://www.blender.org/documentation/250PythonDoc/bge.logic.html?highlight=link

Hi orinoco56!
I saw all type of documentation and all type of references…but I found anything!
The link that you propose belong to my list of internet pages seen and seen…

I’m working in a solution for that. If you are able to build your own blender you can try this patch: http://www.pasteall.org/14073/diff

And here is some python sample code - http://www.pasteall.org/14074/python

I hope it helps,