Python-Lua-Helper 1.1.0__tar.gz → 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/PKG-INFO +1 -1
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/lua/lua-windows-i686 +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/lua/lua-windows-x86_64 +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/py_lua_helper.py +7 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/test_example.py +3 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/.gitignore +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/LICENSE +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/hatch_build.py +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/lua/build-mingw.sh +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/lua/build.patch +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/lua/lua-5.4.8.sha256 +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/pyproject.toml +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/__init__.py +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/loader.lua +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/test_example/example.cfg.lua +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/test_example/example.post.lua +0 -0
- {python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/test_example/example.pre.lua +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Python-Lua-Helper
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Lua configuration system for your Python projects.
|
|
5
5
|
Project-URL: Repository, https://github.com/DarkCaster/Python-Lua-Helper.git
|
|
6
6
|
Author-email: DarkCaster <dark.caster@outlook.com>
|
|
Binary file
|
|
Binary file
|
|
@@ -401,6 +401,13 @@ class PyLuaHelper:
|
|
|
401
401
|
return bool(default)
|
|
402
402
|
raise
|
|
403
403
|
|
|
404
|
+
def get_list(self, key: str) -> List:
|
|
405
|
+
"""Get indexed elements of table as list of strings if variable is a table and indexed (keyless) elements present, empty list if no elements present or variable is not a table"""
|
|
406
|
+
result = []
|
|
407
|
+
for i in self.get_table_seq(key):
|
|
408
|
+
result.append(self.get(f"{key}.{i}"))
|
|
409
|
+
return result
|
|
410
|
+
|
|
404
411
|
def get_table_start(self, key: str) -> int:
|
|
405
412
|
"""Get start indexed element index of table if variable is a table and indexed (keyless) elements present, 0 if no indexed elements present"""
|
|
406
413
|
if key in self._metadata:
|
|
@@ -141,6 +141,9 @@ print(f"example.py: config.sub.loader_args indices sequence: {cfg.get_table_seq(
|
|
|
141
141
|
for i in cfg.get_table_seq('config.sub.loader_args'):
|
|
142
142
|
print(f"example.py: cfg['config.sub.loader_args.{i}'] = {cfg.get(f'config.sub.loader_args.{i}', 'NOT_FOUND')}")
|
|
143
143
|
|
|
144
|
+
print("example.py: === getting extra params (or cmdline args) as list ===")
|
|
145
|
+
print(f"example.py: {cfg.get_list('config.sub.loader_args')}")
|
|
146
|
+
|
|
144
147
|
# Test typed get
|
|
145
148
|
print("example.py: === test getting values with specific type from config.sub.types table ===")
|
|
146
149
|
print(f"example.py: get bool value, no fallback: cfg['config.sub.types.b'] = {cfg.get_bool('config.sub.types.b')}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/test_example/example.cfg.lua
RENAMED
|
File without changes
|
{python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/test_example/example.post.lua
RENAMED
|
File without changes
|
{python_lua_helper-1.1.0 → python_lua_helper-1.2.0}/python_lua_helper/test_example/example.pre.lua
RENAMED
|
File without changes
|