我们如何在XAMPP中执行Pyscript?

发布于 2025-01-27 16:43:48 字数 207 浏览 2 评论 0原文

如您所知,HTML将技术作为Pyscript引入了Python。

如果您不知道: pyscript是什么?

如何在XAMPP中进行配置?

As you know, technology was introduced as pyscript for the use of Python by html.

if you do not know: What is pyscript?

how do config that in xampp?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

想挽留 2025-02-03 16:43:48

引用 pyscript.net

您不需要安装任何内容。

Quote from pyscript.net

You don't need to install anything. ????

To use PyScript you can either download it and follow the
instructions, or add the following lines to your page.

<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css"/>
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>

Click here for more info on how to use PyScript.

If you don't need MySQL you can serve your DocumentRoot even without XAMPP using python itself or any other lightweight webserver:

python3 -m http.server

Then start with a simple html file. PyScript will fetch and cache its needed dependencies automatically:

<html>
<meta charset="utf-8">
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>

<py-script>

print('Hello World! ????')

</py-script>

</html>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文