Scaffold extension class
scaffold_extensionAdd a Python extension class to a COMP by creating a Text DAT, wiring it into an extension slot, promoting it for direct member calls, and reinitializing.
Instructions
Give a COMP a Python extension class: create a Text DAT holding the class (with optional method stubs), wire it into an extension slot, optionally promote it (so members are callable directly on the COMP), and reinitialize. The other half of making a generated network reusable — pair with add_custom_parameters (knobs) and manage_component (save as .tox).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slot | No | Extension slot (1–8) — a COMP can hold several extensions. | |
| methods | No | Optional method-name stubs to add to the class (each takes only `self`). | |
| promote | No | Promote the extension so its members are callable directly on the COMP (op.Method()). | |
| comp_path | Yes | The COMP to give a Python extension class. | |
| class_name | Yes | Extension class name, e.g. 'WidgetExt' (capitalized to a valid identifier; must already be identifier-safe). |