-
Notifications
You must be signed in to change notification settings - Fork 102
Support for Python? #176
-
In the article https://blog.stackblitz.com/posts/announcing-tutorialkit/ you wrote "if it runs in a WebContainer, it will run in TutorialKit". Does it mean it can be used even with Python? Or PHP? Are there any examples how to use it? Official documentation does not mention it anywhere. Thank you for the answer.
Beta Was this translation helpful? Give feedback.
All reactions
Hey 👋
If you mean whether or not you can use Python in your tutorial then the short answer is no, not currently. That's not supported by TutorialKit at the moment nor PHP.
The longer answer
WebContainer has experimental support for Python. Generally it's important to point out that WebContainer cannot run arbitrary binaries / native code. This means that the Python support in WebContainer is limited to a pure/vanilla Python which means you can't use pip to install packages. You can use packages if it's pure Python packages and don't rely on native code. Any native code has to be compiled to Wasm/WASI to work in WebContainer since it can't run binaries and also doesn't emulate say x86 at t...
Replies: 1 comment
-
Hey 👋
If you mean whether or not you can use Python in your tutorial then the short answer is no, not currently. That's not supported by TutorialKit at the moment nor PHP.
The longer answer
WebContainer has experimental support for Python. Generally it's important to point out that WebContainer cannot run arbitrary binaries / native code. This means that the Python support in WebContainer is limited to a pure/vanilla Python which means you can't use pip to install packages. You can use packages if it's pure Python packages and don't rely on native code. Any native code has to be compiled to Wasm/WASI to work in WebContainer since it can't run binaries and also doesn't emulate say x86 at this point.
The same goes for PHP except that WebContainer doesn't have a built-in php command unlike python which is available in the shell. However, you can run PHP if you use for example PHP Wasm but you'd have to include this yourself and wire it up.
Beta Was this translation helpful? Give feedback.