M
M
mrozhentsev2021-01-21 17:57:08
Python
mrozhentsev, 2021-01-21 17:57:08

How to run lua script from python?

I need to run a lua script from python. Found this example:

import subprocess

result = subprocess.run(['lua', '-ls', 'test.lua'])
print(result)

Returns an error:
File "C:\Users\Admin\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Не удается найти указанный файл

But the file is in the same directory as the python file. What could be the problem?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question