Skip to content

Conversation

@hugovk
Copy link
Contributor

@hugovk hugovk commented Jan 22, 2026

Before, there's a lot of shared state, and one REPL is initialised with two >>> >>> prompts and the other isn't usable.

@hugovk
Copy link
Contributor Author

hugovk commented Jan 22, 2026

Tested with this examples/index.html:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>pyrepl-web test</title>
</head>

<body>
    <div class="pyrepl" data-theme="catppuccin-mocha"
    data-packages="pydantic, typer" data-title="My Custom REPL"
    data-src="demo.py"></div>

    <div class="pyrepl" data-theme="catppuccin-latte"
    data-packages="prettytable" data-title="My Custom REPL 2"
    data-src="demo2.py"></div>

    <script src="/embed.js"></script>
</body>

</html>

And examples/demo2.py:

x = 1

print("number 2")

Copy link
Owner

@savannahostrowski savannahostrowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I hadn't even tried to optimize any of this yet, still just hacking on it but this is great! Thanks Hugo!

@savannahostrowski savannahostrowski merged commit e911f13 into savannahostrowski:main Jan 23, 2026
@hugovk hugovk deleted the multirepl branch January 23, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants