script
Assemble executed code blocks into a single Python script, prepending 'from build123d import *' for reproducibility. Optionally save to file or return the script content.
Instructions
Return a single Python script assembled from all successfully executed code blocks in this session. Prepends 'from build123d import *' if not already present. If save_to is given, writes the script to that path and returns {script_path, blocks}; otherwise returns {script, blocks}. Useful for exporting a reproducible script after an interactive session.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save_to | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |