PySnippet is a JavaScript plugin that allows using Python snippets on StackOverflow, adding just one line of code. The plugin uses PyScript to run a python code in the browser. Using the PySnippet is effective if you want to show an output of simple things that primarily use neither OS nor drivers.
The CDN is powered by jsdelivr.
https://cdn.jsdelivr.net/gh/pysnippet/pysnippet@latest/snippet.js
https://cdn.jsdelivr.net/gh/pysnippet/pysnippet@latest/snippet.min.js
- Add the plugin as an external library in the
HTML
section.<script src="https://cdn.jsdelivr.net/gh/pysnippet/pysnippet@latest/snippet.js"></script>
- Paste your Python code into the
JavaScript
section. - Uncheck the "Show console" checkbox to hide the JavaScript console. The states of rest checkboxes do not matter and
depend on your choice.
- Show console
- Use BabelJS / ES2015
- Hide snippet by default
Copyright (C) 2022 Artyom Vancyan. Apache 2.0