Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/guides/coming_from/jupyter.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ This supports:
- **py:percent format**: If your script uses `# %%` cell markers, marimo will convert it to a multi-cell notebook (requires jupytext)
- **Regular Python scripts**: Scripts without cell markers are converted to a single-cell notebook

!!! note "`if __name__ == \"__main__\":` guards"

For plain (non-percent) scripts, marimo rewrites a **top-level**
`if __name__ == "__main__":` block into a `_main_()` helper so the entry
point still runs under marimo's execution model. The conversion only
rewrites a real statement-level guard — mentions of that text inside
string literals or comments are left alone. Guards with an `else:` branch
are not rewritten.

For py:percent conversion with uv:

```bash
Expand Down
Loading