12 Star 61 Fork 56

金诺 / TDXPystock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
executor.py 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
金诺 提交于 2023-04-26 08:59 . Create executor.py
import sys
import subprocess
def execute_python_code(code):
result = subprocess.run(['python3', '-c', code], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
return result.stdout, result.stderr
if __name__ == '__main__':
code = sys.argv[1]
stdout, stderr = execute_python_code(code)
print(stdout)
if stderr:
sys.stderr.write(stderr)
Python
1
https://gitee.com/top3/TDXPystock.git
git@gitee.com:top3/TDXPystock.git
top3
TDXPystock
TDXPystock
newmastor

搜索帮助