run_script
Execute Python scripts with full access to klayout.db for advanced layout editing and creation. Captures stdout output and supports session rebinding.
Instructions
Execute Python with klayout.db available (advanced).
Injected names: db (klayout.db), klayout, session (current
LayoutSession or None), LayoutSession. stdout is captured and returned.
A script may rebind session to a new LayoutSession to make it the active
layout. Runs locally in-process with full Python access.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |