首页 > 解决方案 > 从 lua 脚本运行 python 脚本

问题描述

******************我有两个脚本******************************

文件名:abcd.py

def fun() :
    x = 1
    return x

z = fun()
print z

文件名 xyz.lua

os.execute('start cmd /c C:/Python34/python.exe "C:/Folder/abcd.py"')  

我没有得到结果。请帮我解决这个问题,我如何从 lua 执行 python 脚本。在这里我想从 xyz.lua 运行 abcd.py 脚本

我在windows环境下工作。

标签: pythonwindowslua

解决方案


推荐阅读