Skip to content

Instantly share code, notes, and snippets.

@K4zuki
Created July 10, 2019 05:12
Show Gist options
  • Save K4zuki/e6f3144221b199e9f295b3e3d9ea455c to your computer and use it in GitHub Desktop.
Save K4zuki/e6f3144221b199e9f295b3e3d9ea455c to your computer and use it in GitHub Desktop.
use-lupa.md

get lupa package

apk add py3-lupa
apt install python3-lupa

use lupa to get lua module search paths

from lupa import LuaRuntime

lua = LuaRuntime(unpack_returned_tuples=True)
package = lua.require("package")

package.path
>>> '/usr/local/share/lua/5.3/?.lua;/usr/local/share/lua/5.3/?/init.lua;/usr/local/lib/lua/5.3/?.lua;/usr/local/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment