kkpyutil 1.43.0__tar.gz → 1.44.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.
- {kkpyutil-1.43.0 → kkpyutil-1.44.0}/PKG-INFO +1 -1
- {kkpyutil-1.43.0 → kkpyutil-1.44.0}/kkpyutil.py +18 -12
- {kkpyutil-1.43.0 → kkpyutil-1.44.0}/pyproject.toml +1 -1
- {kkpyutil-1.43.0 → kkpyutil-1.44.0}/LICENSE +0 -0
- {kkpyutil-1.43.0 → kkpyutil-1.44.0}/README.md +0 -0
- {kkpyutil-1.43.0 → kkpyutil-1.44.0}/kkpyutil_helper/windows/kkttssave.ps1 +0 -0
- {kkpyutil-1.43.0 → kkpyutil-1.44.0}/kkpyutil_helper/windows/kkttsspeak.ps1 +0 -0
|
@@ -74,18 +74,6 @@ if PLATFORM == 'Windows':
|
|
|
74
74
|
|
|
75
75
|
# region classes
|
|
76
76
|
|
|
77
|
-
# class ClassicSingleton:
|
|
78
|
-
# _instances = {}
|
|
79
|
-
#
|
|
80
|
-
# def __new__(cls, *args, **kwargs):
|
|
81
|
-
# if cls not in cls._instances:
|
|
82
|
-
# print(f"Creating new instance for {cls}")
|
|
83
|
-
# cls._instances[cls] = super(ClassicSingleton, cls).__new__(cls, *args, **kwargs)
|
|
84
|
-
# else:
|
|
85
|
-
# print(f"Reusing instance for {cls}")
|
|
86
|
-
# return cls._instances[cls]
|
|
87
|
-
|
|
88
|
-
|
|
89
77
|
class ClassicSingleton:
|
|
90
78
|
_instances = {}
|
|
91
79
|
|
|
@@ -148,6 +136,24 @@ class SingletonDecorator:
|
|
|
148
136
|
return self.instance
|
|
149
137
|
|
|
150
138
|
|
|
139
|
+
class ExceptableThread(threading.Thread):
|
|
140
|
+
def __init__(self, *args, **kwargs):
|
|
141
|
+
super().__init__(*args, **kwargs)
|
|
142
|
+
self.exception = None
|
|
143
|
+
|
|
144
|
+
def run(self):
|
|
145
|
+
try:
|
|
146
|
+
if self._target:
|
|
147
|
+
self._target(*self._args, **self._kwargs)
|
|
148
|
+
except Exception as e:
|
|
149
|
+
self.exception = e
|
|
150
|
+
|
|
151
|
+
def join(self, *args, **kwargs):
|
|
152
|
+
super().join(*args, **kwargs)
|
|
153
|
+
if self.exception:
|
|
154
|
+
raise self.exception
|
|
155
|
+
|
|
156
|
+
|
|
151
157
|
class LowPassLogFilter(object):
|
|
152
158
|
"""
|
|
153
159
|
Logging filter: Show log messages below input level.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|