ipython_run
Execute Python code in a named IPython session and obtain the exact terminal output, including exception tracebacks. Supports IPython magics and configurable timeouts.
Instructions
Run code in a session and return the output transcript, exactly as a terminal would show it. A Python exception is a normal result: you get the traceback. Executions within a session are strictly serial, so a second call while one is running is rejected. On timeout the cell is interrupted and you get the partial output. Do not hold long-running work in a cell -- start it in a thread from your own code. This is a real IPython shell: use obj? and obj?? for signatures and source, %whos to list the namespace, and %history for past input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Code to execute. May span multiple lines and use IPython magics. | |
| name | Yes | Session to run in. | |
| timeout_ms | No | Interrupt the cell after this long. Default 30000, maximum 600000. |