2022年 11月 4日

python代码运行助手是什么_Python代码运行助手

Python代码运行助手

Python代码运行助手可以让你在线输入Python代码,然后通过本机运行的一个Python脚本来执行代码。原理如下:

在网页输入代码:

点击

Run

按钮,代码被发送到本机正在运行的Python代码运行助手;

Python代码运行助手将代码保存为临时文件,然后调用Python解释器执行代码;

网页显示代码执行结果:

下载

点击右键,目标另存为:learning.py

备用下载地址:learning.py

运行

在存放

learning.py

的目录下运行命令:

C:\Users\michael\Downloads> python learning.py

如果看到

Ready for Python code on port 39093…

表示运行成功,不要关闭命令行窗口,最小化放到后台运行即可:

┌────────────────────────────────────────────────────────┐ │Command Prompt – x │ ├────────────────────────────────────────────────────────┤ │Microsoft Windows [Version 10.0.0] │ │(c) 2015 Microsoft Corporation. All rights reserved. │ │ │ │C:\Users\michael\Downloads> python learning.py │ │Ready for Python code on port 39093… │ │Press Ctrl + C to exit… │ │ │ │ │ │ │ │ │ │ │ └────────────────────────────────────────────────────────┘

试试效果

需要支持HTML5的浏览器:

Firefox

Chrome

Sarafi

# 测试代码: Run