无法从 Lua 脚本中执行 python 文件

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")
点赞
用户5525442
用户5525442

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

py = require 'python'
parser = py.import parser
getFile = parser() -- this will call you python funtion
2018-10-12 13:09:44