如何使用HTML运行Python?

2024-06-11 16:10:12 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图让我的html文件使用python多点触摸批处理文件执行python源代码。你知道吗

文件名为

C:\Users\Alien\Desktop\PYMT\pymt.bat

我在逃避

C:\Users\Alien\Desktop\Multitouch\website template\home.html

我该怎么做?你知道吗


Tags: 文件home源代码文件名htmltemplatewebsiteusers
2条回答

这样做应该是可能的。。你知道吗

<a href="../../PYMT/pymt.bat">RUN PYTHON</a>

埃弗特

你可以做一件简单的事。。。 用javascript和Ajax编写代码,从中调用python文件中的函数文件准备就绪()功能。你知道吗

例如

    $(document).ready(function(){

    $.ajax
            ({  
                type: "GET",
                    url: "/topythonFunction/", 
                data: { },
                success: function (data) 
                {   
    }
    });
});

相关问题 更多 >