kkpyutil 1.33.0__py3-none-any.whl → 1.33.3__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.0.dist-info → kkpyutil-1.33.3.dist-info}/METADATA +1 -1
- kkpyutil-1.33.3.dist-info/RECORD +7 -0
- kkpyutil.py +18 -2
- kkpyutil-1.33.0.dist-info/RECORD +0 -7
- {kkpyutil-1.33.0.dist-info → kkpyutil-1.33.3.dist-info}/LICENSE +0 -0
- {kkpyutil-1.33.0.dist-info → kkpyutil-1.33.3.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
kkpyutil.py,sha256=SZkL5zn8I5c-n07PBQ9x-D36bRVMTJQa0nvqYGEsaDQ,107200
|
|
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.3.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
|
|
5
|
+
kkpyutil-1.33.3.dist-info/METADATA,sha256=0--MqyDThQpYZaRVP4vPImxTy0noyJbu8Yslf1QcTNQ,1136
|
|
6
|
+
kkpyutil-1.33.3.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
|
|
7
|
+
kkpyutil-1.33.3.dist-info/RECORD,,
|
kkpyutil.py
CHANGED
|
@@ -584,9 +584,25 @@ def get_clipboard_content():
|
|
|
584
584
|
|
|
585
585
|
|
|
586
586
|
def alert(content, title='Debug', action='Close'):
|
|
587
|
+
"""
|
|
588
|
+
- on Windows, mshta msgbox does not support custom button text
|
|
589
|
+
- so "action" is ignored on windows
|
|
590
|
+
- multiline message uses \n as line separator
|
|
591
|
+
- mshta (ms html application host) tend to open vbs using text editor; so we use dedicated vbscript cli instead
|
|
592
|
+
"""
|
|
587
593
|
if PLATFORM == 'Windows':
|
|
588
|
-
|
|
589
|
-
|
|
594
|
+
# Escape double quotes inside content and title for VBScript
|
|
595
|
+
# vbs uses its own line-end
|
|
596
|
+
content = content.replace('\n', '" & vbCrLf & "').replace('"', '""')
|
|
597
|
+
title = title.replace('"', '""')
|
|
598
|
+
# Construct the VBScript command for the message box
|
|
599
|
+
vbs_content = f'MsgBox "{content}", 0, "{title}"'
|
|
600
|
+
vbs = osp.join(get_platform_tmp_dir(), 'msg.vbs')
|
|
601
|
+
save_text(vbs, vbs_content)
|
|
602
|
+
cmd = ['cscript', '//Nologo', vbs]
|
|
603
|
+
subprocess.run(cmd, shell=True)
|
|
604
|
+
# Clean up the temporary file
|
|
605
|
+
os.remove(vbs)
|
|
590
606
|
return cmd
|
|
591
607
|
if PLATFORM == 'Darwin':
|
|
592
608
|
cmd = ['osascript', '-e', f'display alert "{title}" message "{content}"']
|
kkpyutil-1.33.0.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
kkpyutil.py,sha256=Eavzqsw6lUTaUPh69v_Oy2MKEV5J99qUHZjrAoxh5lY,106457
|
|
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.0.dist-info/LICENSE,sha256=uISevGnCxB5QOU0ftbofN75_yUtd6E2h_MWE1zqagC8,1065
|
|
5
|
-
kkpyutil-1.33.0.dist-info/METADATA,sha256=mpP-kFpF1tSKRyhSKgXCBnM7jqd4GSv-JFdiixgmm-k,1136
|
|
6
|
-
kkpyutil-1.33.0.dist-info/WHEEL,sha256=kLuE8m1WYU0Ig0_YEGrXyTtiJvKPpLpDEiChiNyei5Y,88
|
|
7
|
-
kkpyutil-1.33.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|