无法从lua脚本执行python文件

时间:2018-10-12 11:10:54

标签: python lua path python-3.7

os.execute("C:\\py+lua\\parser.py")

我从lua脚本中调用此命令。它对我不起作用。 os.execute返回0。 已安装Python 3.7

已编辑。 它以这种方式开始工作:

os.execute("C:\\InstallPython\\python.exe C:\\py+lua\\parser.py")

1 个答案:

答案 0 :(得分:0)

如果您的解析器文件需要从站点获取信息,我建议在lua中使用python。

py = require 'python'
parser = py.import parser
getFile = parser() -- this will call you python funtion