如何使用jsjspy在html中运行python文件

问题描述

如何在html中运行python文件

<script type="text/javascript">
    pypyjs.ready()
    .then(function() {
         pypyjs.execfile("C:/Users/User/Desktop/FYP/Prototype/FYP front end/FYP front end/new.py")
     });

</script>

我只想运行文件,不需要任何输出

解决方法

你是说 pypy.js https://github.com/pypyjs/pypyjs 吗?正如自述文件中所述,“开发正在休眠,请改用 piodide”