playground.py opens as a plain Python file with
# %% markers instead of notebook cells. Playgrounds use jupytext
percent format: one .py file that behaves as a notebook in the right
editor.
Fix
- VS Code: install the Python extension, then open
playground.pyand use Run Cell / the interactive window. VS Code understands# %%natively. - JupyterLab: enable the jupytext contents manager so percent-format files open as notebooks.
- Committed an
.ipynbby accident: the repo keeps playgrounds as percent-format Python. In a repository checkout, runbake nb-to-pyto convert everything back and delete the.ipynbfiles.