libs5-python 1.0.7__tar.gz → 1.0.8__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.
- {libs5_python-1.0.7 → libs5_python-1.0.8}/.gitignore +5 -1
- {libs5_python-1.0.7 → libs5_python-1.0.8}/PKG-INFO +1 -1
- {libs5_python-1.0.7 → libs5_python-1.0.8}/pyproject.toml +1 -1
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/File.py +2 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/Ini.py +17 -6
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/Logger.py +11 -5
- {libs5_python-1.0.7 → libs5_python-1.0.8}/LICENSE +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/MANIFEST.in +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/README.md +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/install.sh +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/requirements.txt +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/setup.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/__init__.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/StringUtils.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/__init__.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/apiutils.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/args.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/asserts.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/io.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/log.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/math.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/random.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/regex.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/system.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/tests/__init__.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/tests/kepler.py +0 -0
- {libs5_python-1.0.7 → libs5_python-1.0.8}/src/net/hypki/tests/numpytest.py +0 -0
|
@@ -39,4 +39,8 @@ dist/libs5_python-1.0.3.tar.gz
|
|
|
39
39
|
dist/libs5_python-1.0.4-py3-none-any.whl
|
|
40
40
|
dist/libs5_python-1.0.4.tar.gz
|
|
41
41
|
dist/libs5_python-1.0.5-py3-none-any.whl
|
|
42
|
-
dist/libs5_python-1.0.5.tar.gz
|
|
42
|
+
dist/libs5_python-1.0.5.tar.gz
|
|
43
|
+
dist/libs5_python-1.0.6-py3-none-any.whl
|
|
44
|
+
dist/libs5_python-1.0.6.tar.gz
|
|
45
|
+
dist/libs5_python-1.0.7-py3-none-any.whl
|
|
46
|
+
dist/libs5_python-1.0.7.tar.gz
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: libs5-python
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.8
|
|
4
4
|
Summary: libs5 python scripts, and helper classes (useg e.g. in BEANS software)
|
|
5
5
|
Project-URL: Homepage, https://gitlab.com/ahypki/libs5-python
|
|
6
6
|
Project-URL: Issues, https://gitlab.com/ahypki/libs5-python/-/issues/
|
|
@@ -63,7 +63,14 @@ class Ini(object):
|
|
|
63
63
|
keys.append(self.__getKey(line))
|
|
64
64
|
return keys
|
|
65
65
|
|
|
66
|
-
def
|
|
66
|
+
def add(self, section, key, value):
|
|
67
|
+
v = self.get(section, key)
|
|
68
|
+
forceAdd = True
|
|
69
|
+
if v is not None:
|
|
70
|
+
forceAdd = False
|
|
71
|
+
self.set(section, key, value, forceAdd=forceAdd)
|
|
72
|
+
|
|
73
|
+
def set(self, section, key, value, forceAdd = False):
|
|
67
74
|
newLines = []
|
|
68
75
|
currentSection = None
|
|
69
76
|
for line in self.__getIni():
|
|
@@ -72,11 +79,15 @@ class Ini(object):
|
|
|
72
79
|
if self.__isSection(line):
|
|
73
80
|
currentSection = self.__getSection(line)
|
|
74
81
|
|
|
75
|
-
if
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
if forceAdd and currentSection is not None and currentSection == section:
|
|
83
|
+
newLines.append(key + " = " + value)
|
|
84
|
+
lineAdded = True
|
|
85
|
+
else:
|
|
86
|
+
if self.__isKey(line):
|
|
87
|
+
currentKey = self.__getKey(line)
|
|
88
|
+
if currentSection is not None and currentSection == section and currentKey == key:
|
|
89
|
+
newLines.append(key + " = " + value)
|
|
90
|
+
lineAdded = True
|
|
80
91
|
|
|
81
92
|
if not lineAdded:
|
|
82
93
|
newLines.append(line)
|
|
@@ -30,22 +30,28 @@ class Logger:
|
|
|
30
30
|
|
|
31
31
|
def debug(msg, printLogLevel = True, printNewLine = True): # @NoSelf
|
|
32
32
|
if Logger.DEBUG:
|
|
33
|
-
|
|
33
|
+
print(("DEBUG " if printLogLevel and Logger.PRINT_LEVEL else '')
|
|
34
34
|
+ str(msg),
|
|
35
|
+
# no_wrap = True,
|
|
35
36
|
end = ('\n' if printNewLine else ''))
|
|
36
37
|
|
|
37
38
|
def info(msg, printLogLevel = True, printNewLine = True): # @NoSelf
|
|
38
39
|
if Logger.INFO:
|
|
39
|
-
|
|
40
|
+
print(("INFO " if printLogLevel and Logger.PRINT_LEVEL else '')
|
|
40
41
|
+ str(msg),
|
|
42
|
+
# no_wrap = False,
|
|
43
|
+
# crop = False,
|
|
44
|
+
# width = 1280,
|
|
41
45
|
end = ('\n' if printNewLine else ''))
|
|
42
46
|
|
|
43
47
|
def warn(msg, printLogLevel = True, printNewLine = True): # @NoSelf
|
|
44
|
-
|
|
45
|
-
+ str(Logger.WARNING + msg + Logger.WARNING_END),
|
|
48
|
+
print(("WARN " if printLogLevel and Logger.PRINT_LEVEL else '')
|
|
49
|
+
+ str(Logger.WARNING + msg + Logger.WARNING_END),
|
|
50
|
+
# no_wrap = True,
|
|
46
51
|
end = ('\n' if printNewLine else ''))
|
|
47
52
|
|
|
48
53
|
def error(msg, printLogLevel = True, printNewLine = True): # @NoSelf
|
|
49
|
-
|
|
54
|
+
print(("ERROR " if printLogLevel and Logger.PRINT_LEVEL else '')
|
|
50
55
|
+ str(msg),
|
|
56
|
+
# no_wrap = True,
|
|
51
57
|
end = ('\n' if printNewLine else ''))
|
|
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
|