How to list all scenes, objects, sensors, controllers, actuators, etc Can I assign a module to an empty or an object in my scene and when I run it to be able to define all the scenes, all their objects, all their sensors, their controllers and their actuators?

If yes, how? and if not, why?

thanks.
The following code will list all loaded scenes, objects and thier sensors; controllers and actuators :

scenes = bge.logic.getSceneList()
for scene in scenes :
    print("scene : %s"%scene.name)
    for obj in scene.objects :
        print("   object : %s"%obj.name)
        for sensor in obj.sensors :
            print("      sensor : %s"%sensor.name)  
        for cont in obj.controllers :
            print("      controller : %s"%cont.name)      
        for actu in obj.actuators :
            print("      actuator : %s"%actu.name)