2004-05-30 11:09:46 +00:00
|
|
|
# $Id$
|
2004-05-24 07:49:50 +00:00
|
|
|
# Documentation for SCA_PythonController
|
2004-06-02 12:43:27 +00:00
|
|
|
from SCA_IController import *
|
2004-05-24 07:49:50 +00:00
|
|
|
|
2004-06-02 12:43:27 +00:00
|
|
|
class SCA_PythonController(SCA_IController):
|
2004-05-24 07:49:50 +00:00
|
|
|
"""
|
|
|
|
A Python controller uses a Python script to activate it's actuators,
|
|
|
|
based on it's sensors.
|
2008-12-29 16:36:58 +00:00
|
|
|
|
|
|
|
Properties:
|
|
|
|
|
|
|
|
@ivar script: the Python script this controller executes
|
|
|
|
@type script: string, read-only
|
2009-05-06 09:12:08 +00:00
|
|
|
|
|
|
|
@group Deprecated: getScript, setScript
|
2004-05-24 07:49:50 +00:00
|
|
|
"""
|
2009-02-24 05:50:45 +00:00
|
|
|
def activate(actuator):
|
|
|
|
"""
|
|
|
|
Activates an actuator attached to this controller.
|
|
|
|
@type actuator: actuator or the actuator name as a string
|
|
|
|
"""
|
|
|
|
def deactivate(actuator):
|
|
|
|
"""
|
|
|
|
Deactivates an actuator attached to this controller.
|
|
|
|
@type actuator: actuator or the actuator name as a string
|
|
|
|
"""
|
2004-05-24 07:49:50 +00:00
|
|
|
def getScript():
|
|
|
|
"""
|
2008-12-29 16:36:58 +00:00
|
|
|
DEPRECATED: use the script property
|
2004-05-24 07:49:50 +00:00
|
|
|
Gets the Python script this controller executes.
|
|
|
|
|
|
|
|
@rtype: string
|
|
|
|
"""
|
|
|
|
def setScript(script):
|
|
|
|
"""
|
2009-05-06 09:12:08 +00:00
|
|
|
DEPRECATED: use the script property
|
2004-05-24 07:49:50 +00:00
|
|
|
Sets the Python script this controller executes.
|
|
|
|
|
|
|
|
@type script: string.
|
|
|
|
"""
|
|
|
|
|