RunCommand

class commands2.RunCommand(*args, **kwargs)[source]

Bases: FunctionalCommand

A command that runs a Callable continuously. Has no end condition as-is; either subclass it or use commands2.Command.withTimeout() or commands2.Command.until() to give it one. If you only wish to execute a Callable once, use commands2.InstantCommand.

Creates a new RunCommand. The Callable will be run continuously until the command ends. Does not run when disabled.

Parameters:
  • toRun – the Callable to run

  • requirements – the subsystems to require