您的位置:首页 > 编程语言 > Python开发

python : html 调用本地python程序

2018-02-20 16:53 405 查看
show_python.html

<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312">
<title>python draw flowers</title>
<script language="javascript">
function exec1 (command) {
var ws = new ActiveXObject("WScript.Shell");
ws.exec(command);
}
</script>
</head>
<body>
turtle 画一朵花    <a href="/python/draw_flower1.py" target="show"> 源代码 </a>  
<input type="button" value="运行 python" onclick="exec1('D:\\python27\\pythonw.exe D:/python/draw_flower1.py')" />
<br/>
turtle 画一朵玫瑰花 <a href="/python/draw_rose1.py" target="show"> 源代码 </a>  
<input type="button" value="运行 python" onclick="exec1('D:\\python27\\pythonw.exe D:/python/draw_rose1.py')" />
<br/>
turtle 画一朵西兰花 <a href="/python/draw_xilan1.py" target="show"> 源代码 </a>  
<input type="button" value="运行 python" onclick="exec1('D:\\python27\\pythonw.exe D:/python/draw_xilan1.py')" />
<br/>
<iframe name="show" id="show" width="800" height="500"/>
</body>
</html>

draw_flower1.py , draw_rose1.py , draw_xilan1.py 已打包成 test3.zip
下载地址 http://download.csdn.net/download/belldeep/10267837
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  html python