addStepListener(traci.StepListener) -> bool

    Append the step listener (its step function is called at the end of every call to traci.simulationStep())
    Returns True if the listener was added successfully, False otherwise.

def addStepListener(listener):
    """addStepListener(traci.StepListener) -> bool

    Append the step listener (its step function is called at the end of every call to traci.simulationStep())
    Returns True if the listener was added successfully, False otherwise.
    """
    if issubclass(type(listener), StepListener):
        _stepListeners.append(listener)
        return True
    warnings.warn(
        "Proposed listener's type must inherit from traci.StepListener. Not adding object of type '%s'" % type(listener))
    return False