pyhw 0.11.7__tar.gz → 0.11.9__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.
- {pyhw-0.11.7/src/pyhw.egg-info → pyhw-0.11.9}/PKG-INFO +1 -1
- {pyhw-0.11.7 → pyhw-0.11.9}/pyproject.toml +1 -1
- pyhw-0.11.9/src/pyhw/__init__.py +1 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/host/linux.py +2 -2
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/npu/macos.py +14 -14
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/shell/shellInfo.py +3 -0
- pyhw-0.11.9/src/pyhw/backend/shell/windows.py +49 -0
- pyhw-0.11.9/src/pyhw/library/lib/iokitHostLib.dylib +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9/src/pyhw.egg-info}/PKG-INFO +1 -1
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw.egg-info/SOURCES.txt +1 -0
- pyhw-0.11.7/src/pyhw/__init__.py +0 -1
- pyhw-0.11.7/src/pyhw/backend/shell/windows.py +0 -29
- {pyhw-0.11.7 → pyhw-0.11.9}/LICENSE +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/README.md +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/setup.cfg +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/__main__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/backendBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/cpu/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/cpu/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/cpu/cpuBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/cpu/cpuInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/cpu/linux.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/cpu/macos.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/cpu/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/gpu/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/gpu/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/gpu/gpuBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/gpu/gpuInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/gpu/linux.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/gpu/macos.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/gpu/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/host/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/host/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/host/hostBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/host/hostInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/host/macos.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/host/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/kernel/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/kernel/kernelBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/kernel/kernelInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/kernel/unix.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/kernel/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/memory/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/memory/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/memory/linux.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/memory/macos.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/memory/memoryBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/memory/memoryInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/memory/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/metal/t.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/nic/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/nic/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/nic/linux.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/nic/macos.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/nic/nicBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/nic/nicInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/nic/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/npu/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/npu/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/npu/linux.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/npu/npuBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/npu/npuInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/npu/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/os/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/os/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/os/linux.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/os/macos.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/os/osBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/os/osInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/os/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/shell/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/shell/shellBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/shell/unix.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/title/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/title/titleBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/title/titleInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/title/unix.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/title/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/uptime/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/uptime/bsd.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/uptime/linux.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/uptime/macos.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/uptime/uptimeBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/uptime/uptimeInfo.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/backend/uptime/windows.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/color/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/color/colorConfig.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/color/colorSet.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/color/colorUtil.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/frontendBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/alpine.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/arch.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/armbian.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/centos.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/debian.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/fedora.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/fedora_small.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/freebsd.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/kali.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/linux.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/linuxmint.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/macOS.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/opensuse-leap.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/opensuse-tumbleweed.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/raspbian.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/rhel.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/ubuntu.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/ubuntu_small.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/windows_10.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/windows_11.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/windows_2025.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/ascii/windows_old.pyhw +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/frontend/logo/logoBase.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/library/lib/iokitGPULib.dylib +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/pyhwException/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/pyhwException/pyhwException.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/pyhwUtil/__init__.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/pyhwUtil/cliUtil.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/pyhwUtil/pyhwUtil.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw/pyhwUtil/sysctlUtil.py +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw.egg-info/dependency_links.txt +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw.egg-info/entry_points.txt +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw.egg-info/requires.txt +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/src/pyhw.egg-info/top_level.txt +0 -0
- {pyhw-0.11.7 → pyhw-0.11.9}/test/test_cliUtil.py +0 -0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "pyhw"
|
7
|
-
version = "0.11.
|
7
|
+
version = "0.11.9"
|
8
8
|
description = "PyHw, a neofetch-like command line tool for fetching system information but written mostly in python."
|
9
9
|
keywords = ["neofetch", "system information", "command line tool", "python", "hardware information", "fastfetch", "fetching"]
|
10
10
|
authors = [
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.11.9'
|
@@ -26,13 +26,13 @@ class HostDetectLinux:
|
|
26
26
|
try:
|
27
27
|
with open("/sys/devices/virtual/dmi/id/product_name", "r") as f:
|
28
28
|
product_name = f.read().strip()
|
29
|
-
if product_name.startswith("To be filled by O.E.M."):
|
29
|
+
if product_name.startswith("To be filled by O.E.M.") or product_name.startswith("Default string"):
|
30
30
|
self._hostInfo.name = f"General {self._arch} Host"
|
31
31
|
else:
|
32
32
|
self._hostInfo.name = product_name
|
33
33
|
with open("/sys/devices/virtual/dmi/id/product_version", "r") as f:
|
34
34
|
version = f.read().strip()
|
35
|
-
if version.startswith("To be filled by O.E.M."):
|
35
|
+
if version.startswith("To be filled by O.E.M.") or product_name.startswith("Default string"):
|
36
36
|
self._hostInfo.version = ""
|
37
37
|
else:
|
38
38
|
self._hostInfo.version = version
|
@@ -46,20 +46,20 @@ class NPUDetectMacOS:
|
|
46
46
|
# see https://apple.fandom.com/wiki/Neural_Engine for more details.
|
47
47
|
model_name = CPUDetect(os=getOS()).getCPUInfo().model
|
48
48
|
npu = {
|
49
|
-
"Apple M1": "Apple Neural Engine 16 Cores (
|
50
|
-
"Apple M1 Pro": "Apple Neural Engine 16 Cores (
|
51
|
-
"Apple M1 Max": "Apple Neural Engine 16 Cores (
|
52
|
-
"Apple M1 Ultra": "Apple Neural Engine 32 Cores (
|
53
|
-
"Apple M2": "Apple Neural Engine 16 Cores (
|
54
|
-
"Apple M2 Pro": "Apple Neural Engine 16 Cores (
|
55
|
-
"Apple M2 Max": "Apple Neural Engine 16 Cores (
|
56
|
-
"Apple M2 Ultra": "Apple Neural Engine 32 Cores (
|
57
|
-
"Apple M3": "Apple Neural Engine 16 Cores (
|
58
|
-
"Apple M3 Pro": "Apple Neural Engine 16 Cores (
|
59
|
-
"Apple M3 Max": "Apple Neural Engine 16 Cores (
|
60
|
-
"Apple M4": "Apple Neural Engine 16 Cores (
|
61
|
-
"Apple M4 Pro": "Apple Neural Engine 16 Cores (
|
62
|
-
"Apple M4 Max": "Apple Neural Engine 16 Cores (
|
49
|
+
"Apple M1": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
50
|
+
"Apple M1 Pro": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
51
|
+
"Apple M1 Max": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
52
|
+
"Apple M1 Ultra": "Apple Neural Engine 32 Cores (5nm) [SOC Integrated]",
|
53
|
+
"Apple M2": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
54
|
+
"Apple M2 Pro": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
55
|
+
"Apple M2 Max": "Apple Neural Engine 16 Cores (5nm) [SOC Integrated]",
|
56
|
+
"Apple M2 Ultra": "Apple Neural Engine 32 Cores (5nm) [SOC Integrated]",
|
57
|
+
"Apple M3": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
58
|
+
"Apple M3 Pro": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
59
|
+
"Apple M3 Max": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
60
|
+
"Apple M4": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
61
|
+
"Apple M4 Pro": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]",
|
62
|
+
"Apple M4 Max": "Apple Neural Engine 16 Cores (3nm) [SOC Integrated]"
|
63
63
|
}
|
64
64
|
return npu.get(model_name, "Not Found")
|
65
65
|
|
@@ -0,0 +1,49 @@
|
|
1
|
+
"""
|
2
|
+
In dev.
|
3
|
+
"""
|
4
|
+
from ...pyhwException import BackendException
|
5
|
+
from .shellInfo import ShellInfo
|
6
|
+
import json
|
7
|
+
import subprocess
|
8
|
+
import os
|
9
|
+
|
10
|
+
|
11
|
+
class ShellDetectWindows:
|
12
|
+
def __init__(self):
|
13
|
+
self.__shellInfo = ShellInfo()
|
14
|
+
|
15
|
+
def getShellInfo(self):
|
16
|
+
if not self.__getShellBash():
|
17
|
+
self.__getShellPowerShell()
|
18
|
+
self.__shellInfo.info = self.__shellInfo.shell + " " + self.__shellInfo.version
|
19
|
+
return self.__shellInfo
|
20
|
+
|
21
|
+
def __getShellBash(self) -> bool:
|
22
|
+
try:
|
23
|
+
shell_env = os.getenv("SHELL", "")
|
24
|
+
if "bash" in shell_env:
|
25
|
+
self.__shellInfo.shell = "bash"
|
26
|
+
self.__shellInfo.path = shell_env
|
27
|
+
result = subprocess.run(["bash", "-c", "echo $BASH_VERSION"], capture_output=True, text=True)
|
28
|
+
self.__shellInfo.version = result.stdout.strip().split("(")[0]
|
29
|
+
self.__shellInfo.info = self.__shellInfo.shell + " " + self.__shellInfo.version
|
30
|
+
return True
|
31
|
+
else:
|
32
|
+
return False
|
33
|
+
except:
|
34
|
+
return False
|
35
|
+
|
36
|
+
def __getShellPowerShell(self):
|
37
|
+
COMMAND = "$PSVersionTable.PSVersion | ConvertTo-JSON"
|
38
|
+
|
39
|
+
try:
|
40
|
+
result = subprocess.run(["powershell", "-NoProfile", "-Command", COMMAND], capture_output=True, text=True)
|
41
|
+
except subprocess.SubprocessError:
|
42
|
+
raise BackendException("Error running PowerShell command.")
|
43
|
+
|
44
|
+
res = json.loads(result.stdout)
|
45
|
+
major = res["Major"]
|
46
|
+
minor = res["Minor"]
|
47
|
+
|
48
|
+
self.__shellInfo.shell = "PowerShell"
|
49
|
+
self.__shellInfo.version = f"{major}.{minor}"
|
Binary file
|
@@ -114,6 +114,7 @@ src/pyhw/frontend/logo/ascii/windows_11.pyhw
|
|
114
114
|
src/pyhw/frontend/logo/ascii/windows_2025.pyhw
|
115
115
|
src/pyhw/frontend/logo/ascii/windows_old.pyhw
|
116
116
|
src/pyhw/library/lib/iokitGPULib.dylib
|
117
|
+
src/pyhw/library/lib/iokitHostLib.dylib
|
117
118
|
src/pyhw/pyhwException/__init__.py
|
118
119
|
src/pyhw/pyhwException/pyhwException.py
|
119
120
|
src/pyhw/pyhwUtil/__init__.py
|
pyhw-0.11.7/src/pyhw/__init__.py
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.11.7'
|
@@ -1,29 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
In dev.
|
3
|
-
"""
|
4
|
-
from ...pyhwException import BackendException
|
5
|
-
from .shellInfo import ShellInfo
|
6
|
-
import json
|
7
|
-
import subprocess
|
8
|
-
|
9
|
-
|
10
|
-
class ShellDetectWindows:
|
11
|
-
def __init__(self):
|
12
|
-
self.__shellInfo = ShellInfo()
|
13
|
-
|
14
|
-
def getShellInfo(self):
|
15
|
-
COMMAND = "$PSVersionTable.PSVersion | ConvertTo-JSON"
|
16
|
-
|
17
|
-
try:
|
18
|
-
result = subprocess.run(["powershell", "-NoProfile", "-Command", COMMAND], capture_output=True, text=True)
|
19
|
-
except subprocess.SubprocessError:
|
20
|
-
raise BackendException("Error running PowerShell command.")
|
21
|
-
|
22
|
-
res = json.loads(result.stdout)
|
23
|
-
major = res["Major"]
|
24
|
-
minor = res["Minor"]
|
25
|
-
|
26
|
-
self.__shellInfo.shell = "PowerShell"
|
27
|
-
self.__shellInfo.version = f"{major}.{minor}"
|
28
|
-
self.__shellInfo.info = f"PowerShell {major}.{minor}"
|
29
|
-
return self.__shellInfo
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|