diff options
| author | 2023-11-20 09:01:31 +0800 | |
|---|---|---|
| committer | 2023-11-20 09:01:31 +0800 | |
| commit | 4c08ec908bfaba35c6055ee273a0768ba6749089 (patch) | |
| tree | f4e23a50171603dc3046cbd4b5763ab3af70cf0f | |
| parent | 35caa7c2f51878bcef3edea304c20e87040d767a (diff) | |
| download | HydroRoll-4c08ec908bfaba35c6055ee273a0768ba6749089.tar.gz HydroRoll-4c08ec908bfaba35c6055ee273a0768ba6749089.zip | |
feat(tests): 实现对 `Lua5.4` 的封装
| -rw-r--r-- | tests/lua_in_python.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/lua_in_python.py b/tests/lua_in_python.py index eb609d4..34deaab 100644 --- a/tests/lua_in_python.py +++ b/tests/lua_in_python.py @@ -1,3 +1,12 @@ -import lupa +try: + import lupa.luajit2 as lupa +except ImportError: + try: + import lupa.lua54 as lupa + except ImportError: + try: + import lupa.lua53 as lupa + except ImportError: + import lupa print(f"Using {lupa.LuaRuntime().lua_implementation} (compiled with {lupa.LUA_VERSION})")
\ No newline at end of file |
