Scaffold extension class
scaffold_extensionCreate a Python extension class for a COMP, wire it into a slot, optionally promote members, and reinitialize. Supports method stubs and pairs with other tools for reusable networks.
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 |
|---|---|---|---|
| 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). | |
| 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()). | |
| slot | No | Extension slot (1–8) — a COMP can hold several extensions. |