The pyide
element represents a Python Integrated Development Environment (IDE) component.
It is used to embed a Python coding environment within the hyperbook website.
This element allows users to write, edit, and execute Python code directly in the browser.
You can also use any package listed here: https://pyodide.org/en/stable/usage/packages-in-pyodide.html
Add test cases
You can add test cases to the code snippets by adding a test
tag to the code block. The #SCRIPT#
comment will be replaced by the written code. It can be placed in any part of the code block.
Input()
You can use the input()
function in the code snippets. The input()
function is replaced by the values provided in the input
tag.
If there are multiple input()
functions, the values are provided in the order they are written in the input
tag.
If you call input()
more times than the number of values provided, the code will throw an error.
Stopping the execution
Stopping an infinite loop or a long lasting process is only possible by refreshing the page or by setting these two headers on your server: