# To get a sensor linked to this controller.
# "sensorname" is the name of the sensor as defined in the Blender interface.
# +---------------------+ +--------+
# | Sensor "sensorname" +--+ Python +
# +---------------------+ +--------+
sens = co.getSensor("sensorname")
# To get a list of all sensors:
sensors = co.getSensors()

expandPath(path)

Use / as directory separator in path You can use '//' at the start of
the string to define a relative path; Blender replaces that string by the
directory of the startup .blend or runtime file to make a full path name
(doesn't change during the game, even if you load other .blend). The
function also converts the directory separator to the local file system
format.