-
-
Notifications
You must be signed in to change notification settings - Fork 143
Open
Description
Hello,
I need run local lua script (which I can't change)i.e. c:\lua_stuff\some_proj\local.lua I want use lupa.
Can I pass file directly to lupa or use something like:
import lupa.luajit21 as lupa
lua = lupa.LuaRuntime()
with open('c:\\lua_stuff\\some_proj\\local.lua', 'r') as lua_file:
lua_script = lua_file.read()
lua.execute(lua_script)
result = lua.globals().result
print(result)But there is a problem because local.lua use relative paths so in order to run it I need be in c:\lua_stuff\ directory
PS C:\lua_stuff> lua .some_proj\local.luaand since script do to return anything, can I check return code or something?
Metadata
Metadata
Assignees
Labels
No labels