kkpyutil 1.34.0__py3-none-any.whl → 1.36.0__py3-none-any.whl
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.34.0.dist-info → kkpyutil-1.36.0.dist-info}/METADATA +1 -1
- kkpyutil-1.36.0.dist-info/RECORD +7 -0
- kkpyutil.py +14 -0
- kkpyutil-1.34.0.dist-info/RECORD +0 -7
- {kkpyutil-1.34.0.dist-info → kkpyutil-1.36.0.dist-info}/LICENSE +0 -0
- {kkpyutil-1.34.0.dist-info → kkpyutil-1.36.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
kkpyutil.py,sha256=MqHZaKpYvSnqTQafDF-Ij7-ojZAjjWGlJaC3uf2EdpU,107979
|
|
2
|
+
kkpyutil_helper/windows/kkttssave.ps1,sha256=xa3-WzqNh2rGYlOx_I4ewOuCE94gkTO5cEwYH0M67_0,446
|
|
3
|
+
kkpyutil_helper/windows/kkttsspeak.ps1,sha256=7WUUHMmjTQroUWA2Mvdt4JtSt475nZUHQx-qP-7rS6o,305
|
|
4
|
+
kkpyutil-1.36.0.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
|
|
5
|
+
kkpyutil-1.36.0.dist-info/METADATA,sha256=nOnCODHLaO5XgSQJOGaRrKcIJOoOkIINmiGaY_U1Hk8,1136
|
|
6
|
+
kkpyutil-1.36.0.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
|
|
7
|
+
kkpyutil-1.36.0.dist-info/RECORD,,
|
kkpyutil.py
CHANGED
|
@@ -314,6 +314,14 @@ def format_error(expected, got):
|
|
|
314
314
|
{log_got}"""
|
|
315
315
|
|
|
316
316
|
|
|
317
|
+
def format_xml(elem, indent=' ', encoding='utf-8'):
|
|
318
|
+
import xml.etree.ElementTree as ET
|
|
319
|
+
from xml.dom import minidom
|
|
320
|
+
rough_string = ET.tostring(elem, encoding)
|
|
321
|
+
reparsed = minidom.parseString(rough_string)
|
|
322
|
+
return reparsed.toprettyxml(indent=indent)
|
|
323
|
+
|
|
324
|
+
|
|
317
325
|
def throw(err_cls, detail, advice):
|
|
318
326
|
raise err_cls(f"""
|
|
319
327
|
{format_brief('Detail', detail if isinstance(detail, list) else [detail])}
|
|
@@ -1731,6 +1739,7 @@ def copy_file(src, dst, isdstdir=False, keepmeta=False):
|
|
|
1731
1739
|
copyfunc(src, dst)
|
|
1732
1740
|
except shutil.SameFileError:
|
|
1733
1741
|
glogger.warning(f'source and destination are identical. will SKIP: {osp.abspath(src)} -> {osp.abspath(dst)}.')
|
|
1742
|
+
return dst if not isdstdir else osp.join(dst, osp.basename(src))
|
|
1734
1743
|
|
|
1735
1744
|
|
|
1736
1745
|
def move_file(src, dst, isdstdir=False):
|
|
@@ -1751,6 +1760,7 @@ def move_file(src, dst, isdstdir=False):
|
|
|
1751
1760
|
- detail: {e}
|
|
1752
1761
|
- advice: manually remove source
|
|
1753
1762
|
- ignored""")
|
|
1763
|
+
return dst if not isdstdir else osp.join(dst, osp.basename(src))
|
|
1754
1764
|
|
|
1755
1765
|
|
|
1756
1766
|
def compare_dirs(dir1, dir2, ignoreddirpatterns=(), ignoredfilepatterns=(), showdiff=True):
|
|
@@ -2876,6 +2886,10 @@ def remove_unsupported_dict_keys(mydict: dict, supported_keys: set):
|
|
|
2876
2886
|
return mydict
|
|
2877
2887
|
|
|
2878
2888
|
|
|
2889
|
+
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
|
|
2879
2893
|
def _test():
|
|
2880
2894
|
print(say('hello'))
|
|
2881
2895
|
|
kkpyutil-1.34.0.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
kkpyutil.py,sha256=jy1wwUFR7xKpzvpAurANOjQKJefygOAcbPMDqR81xOw,107566
|
|
2
|
-
kkpyutil_helper/windows/kkttssave.ps1,sha256=xa3-WzqNh2rGYlOx_I4ewOuCE94gkTO5cEwYH0M67_0,446
|
|
3
|
-
kkpyutil_helper/windows/kkttsspeak.ps1,sha256=7WUUHMmjTQroUWA2Mvdt4JtSt475nZUHQx-qP-7rS6o,305
|
|
4
|
-
kkpyutil-1.34.0.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
|
|
5
|
-
kkpyutil-1.34.0.dist-info/METADATA,sha256=Lm476tLYWIKATu3ouX5VtNXGUGD2y9vPBz-eAvzP-Hg,1136
|
|
6
|
-
kkpyutil-1.34.0.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
|
|
7
|
-
kkpyutil-1.34.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|