Skip to content

Program section (program_section)

What it does: Names a part of the program and can turn it off completely depending on the switch.

program_section

Inputs

  • SECTION_NAME: section name.
  • ENABLED: on / off.
  • BODY: code inside the section.

Output

  • None (statement block).
  • On shutdown, the code is not inserted into the resulting Python at all.

When to use it

  • For dividing the program into clear parts.
  • When you want to temporarily disable an entire piece of code without deleting it.

Tips and pitfalls

  • Keep the section name short and to the point.
  • The disabled section disappears from the generated Python entirely.
  • Do not use it instead of a condition; it is mainly an organizational block.

Generated Python example

# --- Program 1 ---
print("section is running")