corelp 1.0.34__tar.gz → 1.0.35__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.
- {corelp-1.0.34 → corelp-1.0.35}/PKG-INFO +1 -1
- {corelp-1.0.34 → corelp-1.0.35}/pyproject.toml +1 -1
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/main_LP/main.py +1 -1
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/user_inputs_LP/user_inputs.py +17 -3
- {corelp-1.0.34 → corelp-1.0.35}/README.md +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/icon_pythonLP.png +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/Path_LP/Path.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/Path_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/Path_LP/test_Path.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/Section_LP/Section.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/Section_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/Section_LP/test_Section.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/debug_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/debug_LP/debug.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/debug_LP/test_debug.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/folder_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/folder_LP/folder.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/folder_LP/test_folder.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/getmodule_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/getmodule_LP/getmodule.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/kwargsself_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/kwargsself_LP/kwargsself.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/kwargsself_LP/test_kwargsself.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/main_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/main_LP/test_main.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/print_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/print_LP/print.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/print_LP/test_print.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/prop_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/prop_LP/prop.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/prop_LP/test_prop.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/rfrom_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/rfrom_LP/rfrom.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/rfrom_LP/test_rfrom.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/selfkwargs_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/selfkwargs_LP/selfkwargs.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/selfkwargs_LP/test_selfkwargs.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/test_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/test_LP/test.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/test_LP/test_test.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/user_inputs_LP/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules/user_inputs_LP/test_user_inputs.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/modules.json +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/py.typed +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/pythonLP.png:Zone.Identifier +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/scripts/__init__.py +0 -0
- {corelp-1.0.34 → corelp-1.0.35}/src/corelp/scripts.json +0 -0
|
@@ -25,7 +25,7 @@ import types
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
# %% Function
|
|
28
|
-
def main(
|
|
28
|
+
def main() :
|
|
29
29
|
'''
|
|
30
30
|
This function can decorate the main function of a script.
|
|
31
31
|
User inputs parameters shoud be put in the beginning of the main file, and the decorated function will recognize them.
|
|
@@ -25,8 +25,8 @@ def user_inputs(reset=False) :
|
|
|
25
25
|
|
|
26
26
|
Parameters
|
|
27
27
|
----------
|
|
28
|
-
reset : bool
|
|
29
|
-
True to set as first call
|
|
28
|
+
reset : bool or str
|
|
29
|
+
True to set as first call, String value to define a group of parameters
|
|
30
30
|
|
|
31
31
|
Returns
|
|
32
32
|
-------
|
|
@@ -50,6 +50,7 @@ def user_inputs(reset=False) :
|
|
|
50
50
|
|
|
51
51
|
# Validate status
|
|
52
52
|
if reset :
|
|
53
|
+
user_inputs.current_group = reset if isinstance(reset, str) else None
|
|
53
54
|
user_inputs.cache = None
|
|
54
55
|
|
|
55
56
|
# Case when user_inputs is on top : cache = None
|
|
@@ -60,10 +61,23 @@ def user_inputs(reset=False) :
|
|
|
60
61
|
# Case when user_inputs is at bottom : cache = dict
|
|
61
62
|
else :
|
|
62
63
|
updated = { key: value for key, value in ns.items() if key not in user_inputs.cache or user_inputs.cache[key] is not value}
|
|
64
|
+
values = {key: value for key, value in updated.items() if not key.endswith('_')}
|
|
65
|
+
comments = {key: value for key, value in updated.items() if key.endswith('_')}
|
|
66
|
+
|
|
67
|
+
# Group values
|
|
68
|
+
if user_inputs.current_group is not None :
|
|
69
|
+
user_inputs.groups_values[user_inputs.current_group] = values
|
|
70
|
+
user_inputs.groups_comments[user_inputs.current_group] = comments
|
|
71
|
+
|
|
72
|
+
# End
|
|
73
|
+
user_inputs.current_group = None
|
|
63
74
|
user_inputs.cache = None
|
|
64
|
-
return
|
|
75
|
+
return values
|
|
65
76
|
|
|
66
77
|
user_inputs.cache = None
|
|
78
|
+
user_inputs.current_group = None
|
|
79
|
+
user_inputs.groups_values = {}
|
|
80
|
+
user_inputs.groups_comments = {}
|
|
67
81
|
|
|
68
82
|
|
|
69
83
|
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|