Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support for Python? #176

Answered by d3lm
miso-belica asked this question in Q&A
Discussion options

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.

You must be logged in to vote

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

Comment options

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.

You must be logged in to vote
0 replies
Answer selected by miso-belica
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /