kkpyutil 1.33.6__py3-none-any.whl → 1.34.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.33.6.dist-info → kkpyutil-1.34.0.dist-info}/METADATA +1 -1
- kkpyutil-1.34.0.dist-info/RECORD +7 -0
- kkpyutil.py +12 -0
- kkpyutil-1.33.6.dist-info/RECORD +0 -7
- {kkpyutil-1.33.6.dist-info → kkpyutil-1.34.0.dist-info}/LICENSE +0 -0
- {kkpyutil-1.33.6.dist-info → kkpyutil-1.34.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
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,,
|
kkpyutil.py
CHANGED
|
@@ -2712,6 +2712,18 @@ def http_post(url, data: dict, encoding=TXT_CODEC):
|
|
|
2712
2712
|
return resp
|
|
2713
2713
|
|
|
2714
2714
|
|
|
2715
|
+
def lazy_download(local_file, url, file_open_mode='wb', logger=None):
|
|
2716
|
+
if osp.isfile(local_file):
|
|
2717
|
+
return local_file
|
|
2718
|
+
os.makedirs(osp.dirname(local_file), exist_ok=True)
|
|
2719
|
+
logger = logger or glogger
|
|
2720
|
+
with open(local_file, file_open_mode) as fp:
|
|
2721
|
+
with urllib.request.urlopen(url) as response:
|
|
2722
|
+
logger.info(f'Downloading: {url} => {local_file}')
|
|
2723
|
+
fp.write(response.read())
|
|
2724
|
+
return local_file
|
|
2725
|
+
|
|
2726
|
+
|
|
2715
2727
|
def get_environment():
|
|
2716
2728
|
return {
|
|
2717
2729
|
'os': platform.platform(),
|
kkpyutil-1.33.6.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
kkpyutil.py,sha256=WnFRJdFRB_XBJ_hDCgcxixe0-Kx6XBaw0ZQyMrXXIGU,107124
|
|
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.33.6.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
|
|
5
|
-
kkpyutil-1.33.6.dist-info/METADATA,sha256=-xrkjFabHGbOOMdkBvcWNNJFaIQ-OAdJ9CVJwUeJh2E,1136
|
|
6
|
-
kkpyutil-1.33.6.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
|
|
7
|
-
kkpyutil-1.33.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|