knitout_interpreter.knitout_operations.Pause_Instruction module — knitout-interpreter 0.0.18 documentation

# knitout_interpreter.knitout_operations.Pause_Instruction module

Module for the Pause Knitting Machine Instruction

class knitout_interpreter.knitout_operations.Pause_Instruction.Pause_Instruction(comment=None)

  Bases: `Knitout_Instruction`

  Instruction for pausing the knitting machine.

  execute(machine_state)

    Execute the pause instruction.

    Parameters:

      machine_state (Knitting_Machine) – The machine state (not modified by pause).

    Returns:

      False as no update is caused by pauses.

    Return type:

      bool

  static execute_pause(machine_state, comment=None)

    Execute a pause instruction on the machine.

    Parameters:

      - machine_state (Knitting_Machine) – The current machine model to update.

      - comment (str | None) – Additional details to document in the knitout.

    Returns:

      The instruction that was executed.

    Return type:

      Pause_Instruction