From 6532762bb8537bb4241d21ebe24055ad9dddb03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Tue, 31 Dec 2024 22:13:42 +0800 Subject: [PATCH] . --- py/LunaTranslator/ocrengines/windowsocr.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/py/LunaTranslator/ocrengines/windowsocr.py b/py/LunaTranslator/ocrengines/windowsocr.py index ea0f44c2..d0e192dd 100644 --- a/py/LunaTranslator/ocrengines/windowsocr.py +++ b/py/LunaTranslator/ocrengines/windowsocr.py @@ -10,13 +10,15 @@ from myutils.utils import getlanguagespace from gui.dynalang import LPushButton, LFormLayout, LLabel from gui.usefulwidget import SuperCombo, getboxlayout import threading, qtawesome +from myutils.subproc import subproc_w def getallsupports(): _ = ( - subprocess.run( + subproc_w( "powershell Get-WindowsCapability -Online | Where-Object { $_.Name -Like 'Language.OCR*' }", - stdout=subprocess.PIPE, + needstdio=True, + run=True, ) .stdout.decode() .splitlines()