如何在不烦人的窗口中调用 Python

我是这样从 lua 脚本调用 python 的:

for i=2000,2018 do
--prepare settings file for python
os.execute("C:\\InstallPython\\python.exe C:\\py+lua\\parser.py")
--work with database downloaded by python
end

一切工作正常,但每次 Lua 执行 python 脚本时,我都会遇到烦人的窗口

1. 每次迭代都会出现黑色窗口 2. 每次迭代后黑色窗口就会消失

我该如何

1. 在不打开窗口的情况下或 2. 仅调用此窗口一次

由于这里描述的问题,Lunatic Python 对我不起作用:https://github.com/bastibe/lunatic-python/issues/67

点赞