Skip to content

Commit c8b8ccd

Browse files
committed
Add interactive Python editor component for tutorials
1 parent 6f0ee5a commit c8b8ccd

File tree

4 files changed

+233
-4
lines changed

4 files changed

+233
-4
lines changed

docs/interactive-python-editor.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
id: interactive-python-editor
3+
title: Interactive Python Editor
4+
---
5+
6+
import InteractivePythonEditor from '@site/src/components/InteractivePythonEditor';
7+
8+
This page demonstrates the new interactive Python editor component. You can edit code on the left, see highlighted code on the right, and run it directly in the browser using Pyodide.
9+
10+
<InteractivePythonEditor />
11+
12+
Notes:
13+
- The editor loads Pyodide from a CDN — the first run will take a few seconds while the WebAssembly engine downloads.
14+
- This component is intentionally dependency-free (uses Prism for highlighting and Pyodide for execution via CDN). If you'd like tighter integration (Monaco, local Pyodide mirror, or server-side execution), I can update it.

package-lock.json

Lines changed: 46 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)