Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Pyodide RunnerNew to Visual Studio Code? Get it now.

Pyodide Runner

tym-inc

|
462 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🐍 Run python files on the web with ZERO setup

Run Python code on VS Code without installing a Python intepreter! 🤯

This magic is enabled by Pyodide 🪄, a port of CPython to WebAssembly/Emscripten that lets you run Python on the web!

🚀 How it works

  1. Open a python file
  2. Run it by clicking green play button on the top right corner of the editor.
  3. See the output!
  4. You can also stop the execution of your file by clicking on the red stop button.

Known Limitations

  1. Certain modules cannot be loaded on Pyodide due to limitations of WASM.
    Note: You may be able to install certain modules using micropip. Refer to Pyodide documentation for more information.
  2. Python code may be slow to run when there are many imports, as a new web worker is created each time and the modules will be downloaded on each run. This was done to make sure local imports are handled correctly as there is no easy way for Pyodide to refresh local imports. Once the mechanism of this caching is more clear, a more efficient workaround may arise.
  3. Support for stdin and visual output is WIP. We have created a simple API for drawing circles on a canvas inside of a webview. Please see demo-repo for examples.
  4. IntelliSense might be restricted as modules may not be installed on your filesystem.
  5. time.sleep is treated as a no-op by Pyodide
  6. Since your code is being run inside a top-level await, where you would usualy use asyncio.run(main()), you should use await main() instead for the expected results.

Acknowledgments

This extension builds on top of Pyodide.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft