os.path.join (folder, filename) ensures the path is correct for the system. On Windows, it uses backslashes (reports\summary.txt); on Linux and macOS it uses forward slashes (reports/summary.txt).
I replaced all my bash scripts with Python. Here’s what improved, what broke, and why the switch changed my workflow.
Playwright itself exits in a normal terminal, but inside Codex it never signals completion. For Playwright HTML report (npx playwright show-report), the process requires pressing Ctrl+C twice to stop.
Code is executed using Pyodide in Deno and is therefore isolated from the rest of the operating system. Under the hood, code_sandbox runs an MCP server using stdio. You can run multiple code blocks ...