pyhw 0.15.2__py3-none-any.whl → 0.15.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.
- pyhw/__init__.py +1 -1
- pyhw/backend/memory/bsd.py +3 -3
- pyhw/backend/memory/linux.py +3 -3
- pyhw/backend/memory/macos.py +3 -3
- pyhw/backend/memory/windows.py +3 -3
- pyhw/library/lib/iokitCPULib.dylib +0 -0
- pyhw/library/lib/iokitGPULib.dylib +0 -0
- pyhw/library/lib/iokitHostLib.dylib +0 -0
- pyhw/library/lib/iokitNICLib.dylib +0 -0
- {pyhw-0.15.2.dist-info → pyhw-0.15.3.dist-info}/METADATA +2 -2
- {pyhw-0.15.2.dist-info → pyhw-0.15.3.dist-info}/RECORD +15 -15
- {pyhw-0.15.2.dist-info → pyhw-0.15.3.dist-info}/WHEEL +0 -0
- {pyhw-0.15.2.dist-info → pyhw-0.15.3.dist-info}/entry_points.txt +0 -0
- {pyhw-0.15.2.dist-info → pyhw-0.15.3.dist-info}/licenses/LICENSE +0 -0
- {pyhw-0.15.2.dist-info → pyhw-0.15.3.dist-info}/top_level.txt +0 -0
pyhw/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version__ = '0.15.
|
|
1
|
+
__version__ = '0.15.3'
|
|
2
2
|
__author__ = 'xiaoran007'
|
pyhw/backend/memory/bsd.py
CHANGED
|
@@ -12,9 +12,9 @@ class MemoryDetectBSD(MemoryDetectLinux):
|
|
|
12
12
|
|
|
13
13
|
def getMemoryInfo(self):
|
|
14
14
|
self.__getMemorySysctl()
|
|
15
|
-
self._memoryInfo.total = self.__physical_memory / 1024 / 1024 # Convert bytes to
|
|
16
|
-
self._memoryInfo.used = (self.__physical_memory - self.__free_memory) / 1024 / 1024 # Convert bytes to
|
|
17
|
-
self._memoryInfo.memory = f"{round(self._memoryInfo.used, 2)}
|
|
15
|
+
self._memoryInfo.total = self.__physical_memory / 1024 / 1024 / 1024 # Convert bytes to GiB
|
|
16
|
+
self._memoryInfo.used = (self.__physical_memory - self.__free_memory) / 1024 / 1024 / 1024 # Convert bytes to GiB
|
|
17
|
+
self._memoryInfo.memory = f"{round(self._memoryInfo.used, 2)} GiB / {round(self._memoryInfo.total, 2)} GiB"
|
|
18
18
|
return self._memoryInfo
|
|
19
19
|
|
|
20
20
|
def __getMemorySysctl(self):
|
pyhw/backend/memory/linux.py
CHANGED
|
@@ -7,7 +7,7 @@ class MemoryDetectLinux:
|
|
|
7
7
|
|
|
8
8
|
def getMemoryInfo(self):
|
|
9
9
|
self._getMemory()
|
|
10
|
-
self._memoryInfo.memory = f"{self._memoryInfo.used}
|
|
10
|
+
self._memoryInfo.memory = f"{self._memoryInfo.used} GiB / {self._memoryInfo.total} GiB"
|
|
11
11
|
return self._memoryInfo
|
|
12
12
|
|
|
13
13
|
def _getMemory(self):
|
|
@@ -15,9 +15,9 @@ class MemoryDetectLinux:
|
|
|
15
15
|
with open("/proc/meminfo", "r") as file:
|
|
16
16
|
for line in file:
|
|
17
17
|
if line.startswith("MemTotal:"):
|
|
18
|
-
self._memoryInfo.total = round(float(line.split(":")[1].strip()[:-3]) / 1024, 2)
|
|
18
|
+
self._memoryInfo.total = round(float(line.split(":")[1].strip()[:-3]) / 1024 / 1024, 2)
|
|
19
19
|
elif line.startswith("MemAvailable:"):
|
|
20
|
-
self._memoryInfo.available = round(float(line.split(":")[1].strip()[:-3]) / 1024, 2)
|
|
20
|
+
self._memoryInfo.available = round(float(line.split(":")[1].strip()[:-3]) / 1024 / 1024, 2)
|
|
21
21
|
self._memoryInfo.used = round(self._memoryInfo.total - self._memoryInfo.available, 2)
|
|
22
22
|
except FileNotFoundError:
|
|
23
23
|
pass
|
pyhw/backend/memory/macos.py
CHANGED
|
@@ -19,9 +19,9 @@ class MemoryDetectMacOS:
|
|
|
19
19
|
|
|
20
20
|
def getMemoryInfo(self):
|
|
21
21
|
self.__getMemory()
|
|
22
|
-
self.__memoryInfo.total = self.__mem_total / 1024 / 1024 # Convert bytes to
|
|
23
|
-
self.__memoryInfo.used = self.__mem_used / 1024 / 1024 # Convert bytes to
|
|
24
|
-
self.__memoryInfo.memory = f"{
|
|
22
|
+
self.__memoryInfo.total = self.__mem_total / 1024 / 1024 / 1024 # Convert bytes to GiB
|
|
23
|
+
self.__memoryInfo.used = self.__mem_used / 1024 / 1024 / 1024 # Convert bytes to GiB
|
|
24
|
+
self.__memoryInfo.memory = f"{self.__memoryInfo.used:.2f} GiB / {self.__memoryInfo.total:.2f} GiB"
|
|
25
25
|
return self.__memoryInfo
|
|
26
26
|
|
|
27
27
|
def __getMemory(self):
|
pyhw/backend/memory/windows.py
CHANGED
|
@@ -10,7 +10,7 @@ class MemoryDetectWindows:
|
|
|
10
10
|
|
|
11
11
|
def getMemoryInfo(self):
|
|
12
12
|
self._getMemory()
|
|
13
|
-
self._memoryInfo.memory = f"{self._memoryInfo.used}
|
|
13
|
+
self._memoryInfo.memory = f"{self._memoryInfo.used} GiB / {self._memoryInfo.total} GiB"
|
|
14
14
|
return self._memoryInfo
|
|
15
15
|
|
|
16
16
|
def _getMemory(self):
|
|
@@ -21,8 +21,8 @@ class MemoryDetectWindows:
|
|
|
21
21
|
raise BackendException("Failed to get memory information on Windows.")
|
|
22
22
|
|
|
23
23
|
res = json.loads(result.stdout)
|
|
24
|
-
free_memory = int(res['FreePhysicalMemory']) / 1024
|
|
25
|
-
total_memory = int(res['TotalVisibleMemorySize']) / 1024
|
|
24
|
+
free_memory = int(res['FreePhysicalMemory']) / 1024 / 1024
|
|
25
|
+
total_memory = int(res['TotalVisibleMemorySize']) / 1024 / 1024
|
|
26
26
|
used_memory = total_memory - free_memory
|
|
27
27
|
self._memoryInfo.total = round(total_memory, 2)
|
|
28
28
|
self._memoryInfo.available = round(free_memory, 2)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyhw
|
|
3
|
-
Version: 0.15.
|
|
3
|
+
Version: 0.15.3
|
|
4
4
|
Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
|
|
5
5
|
Author: Xiao Ran
|
|
6
6
|
Maintainer-email: Xiao Ran <xiaoran.007@icloud.com>
|
|
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
|
|
|
13
13
|
Requires-Python: >=3.9
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
|
-
Requires-Dist: pypci-ng>=0.
|
|
16
|
+
Requires-Dist: pypci-ng>=0.3.0
|
|
17
17
|
Dynamic: license-file
|
|
18
18
|
|
|
19
19
|
# PyHw, a neofetch-like system information fetching tool
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pyhw/__init__.py,sha256=
|
|
1
|
+
pyhw/__init__.py,sha256=n85B2Q8z-AqEs2R2FvLy_oKqviq3yymy-uRkvZ2yRww,49
|
|
2
2
|
pyhw/__main__.py,sha256=sycXv_HBzXuNET2w0-fRgMwHaWIsMALyJ_ZCxdZulDk,7696
|
|
3
3
|
pyhw/backend/__init__.py,sha256=X1D1D28lSojDrUzUolgJvmbuctwBh_UxG3FwUeL8adA,51
|
|
4
4
|
pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
|
|
@@ -29,12 +29,12 @@ pyhw/backend/kernel/kernelInfo.py,sha256=Nkumd0McbimCjc7yJrvz6bcwpWu1Tdo_LKomjZr
|
|
|
29
29
|
pyhw/backend/kernel/unix.py,sha256=opG4xTO_l4-boX8FeJmnPa2RJB9dFOfhsuPAf3SQAxg,1191
|
|
30
30
|
pyhw/backend/kernel/windows.py,sha256=kFGnIXIgTp3endyVIoxmUgYh3RrvIqbMHmbWwqlyZro,1180
|
|
31
31
|
pyhw/backend/memory/__init__.py,sha256=zGBWxfPAAk8ivCBWPLJIpuD-lB7wUJT3x8u2jHiAoCY,65
|
|
32
|
-
pyhw/backend/memory/bsd.py,sha256=
|
|
33
|
-
pyhw/backend/memory/linux.py,sha256=
|
|
34
|
-
pyhw/backend/memory/macos.py,sha256=
|
|
32
|
+
pyhw/backend/memory/bsd.py,sha256=DDlryPsjPiJcAHpqX1e-ERqYirp61elcrlCbzCDBPng,1027
|
|
33
|
+
pyhw/backend/memory/linux.py,sha256=gu1FsVZ_ZuG1hObTfuAdCp_7LKJr3NxtN5UfDXptvF8,930
|
|
34
|
+
pyhw/backend/memory/macos.py,sha256=lUYWBdJpAwaHB1HkFGkW4poMVDSlJ21ZbAIPCb3BA2Y,2772
|
|
35
35
|
pyhw/backend/memory/memoryBase.py,sha256=trubcJ_7JD_FnrKefUycPFd4OZMFj3Rk75ih5YVsSXg,790
|
|
36
36
|
pyhw/backend/memory/memoryInfo.py,sha256=OQF165uEyuapAsi7cKacQYDRnKdrQHeldfyFwzS9N2g,186
|
|
37
|
-
pyhw/backend/memory/windows.py,sha256=
|
|
37
|
+
pyhw/backend/memory/windows.py,sha256=_hYKJ-y4kRFo5NzJd0C__3tfsJnmXQT1VzOPgQzdJo0,1215
|
|
38
38
|
pyhw/backend/nic/__init__.py,sha256=eP4eOYIvMF3LcTf954hJa6TnB8R4Qahss2g-UcgypKY,57
|
|
39
39
|
pyhw/backend/nic/bsd.py,sha256=6nj7XXII5dRz3FGRYAXVgTt0vSgyQo0Re9JA1vlcnuw,134
|
|
40
40
|
pyhw/backend/nic/linux.py,sha256=e6gX58RBE9IDKb0FrzZ7U2EhDNfGJsR6OvXq6qO5ZOc,2003
|
|
@@ -103,10 +103,10 @@ pyhw/frontend/logo/ascii/windows_10.pyhw,sha256=jv5pzZs_CdOzpeTjyXfXJWcTQwK-J0LN
|
|
|
103
103
|
pyhw/frontend/logo/ascii/windows_11.pyhw,sha256=VuQTzbBabaEQhm2JBVhy6Ja6lClUGacQsaiNUih9nhU,656
|
|
104
104
|
pyhw/frontend/logo/ascii/windows_2025.pyhw,sha256=o8eWsiyhNpDoEjiWFiBMfkd-8MdIslGc1Jpm85LU4P8,643
|
|
105
105
|
pyhw/frontend/logo/ascii/windows_old.pyhw,sha256=AMsvWAZ50HM8lweWEmzDWbRNDGkKFJo9qLY_VRKrciY,580
|
|
106
|
-
pyhw/library/lib/iokitCPULib.dylib,sha256=
|
|
107
|
-
pyhw/library/lib/iokitGPULib.dylib,sha256=
|
|
108
|
-
pyhw/library/lib/iokitHostLib.dylib,sha256=
|
|
109
|
-
pyhw/library/lib/iokitNICLib.dylib,sha256=
|
|
106
|
+
pyhw/library/lib/iokitCPULib.dylib,sha256=6E77TMJcIFInm_uCTmzH_Q16JWCKKTMK7Cm4Z6AiqmQ,34280
|
|
107
|
+
pyhw/library/lib/iokitGPULib.dylib,sha256=H6_RMZcFyH1NfiATq-RCJ-X97-Huh4TdktT-om-yLBI,155816
|
|
108
|
+
pyhw/library/lib/iokitHostLib.dylib,sha256=vt5YDen6pLBk26u2ODCz8jkSNo2sR7elU4kjgABGSfQ,148968
|
|
109
|
+
pyhw/library/lib/iokitNICLib.dylib,sha256=TNNDDdx60QjY9JA8BrPVnyQZ2EhyiiD_ebaFzspp7So,209448
|
|
110
110
|
pyhw/library/lib/nvmlGPULib_amd64.so,sha256=lrkxeJjChUs8oVhaw_uMeXKbUJp24KroQ_hhcLtHfTg,12784
|
|
111
111
|
pyhw/library/lib/nvmlGPULib_arm64.so,sha256=DFIYqNcuRxiZ8_jrYoaRB3Dx9GrY7UBXscwXQvV4k3I,13528
|
|
112
112
|
pyhw/library/test/iokitCPULibTest.py,sha256=BrhMypgfJTeMectpDc9Tmwzp8gYwYAcowaTFf72LlLE,311
|
|
@@ -121,9 +121,9 @@ pyhw/pyhwUtil/cliUtil.py,sha256=IUcWun5nDwQb20Qe8YefS5j3Jji8a-F41Qd9QwCf0h0,2454
|
|
|
121
121
|
pyhw/pyhwUtil/pciUtil.py,sha256=WAluDRDb-gUbqhvSIusFzPrf6r98EkrNEAwbPyMwrTc,202
|
|
122
122
|
pyhw/pyhwUtil/pyhwUtil.py,sha256=XA1sQnAZmfA3QdmCzqiNWN4CDJKtnPK7N0j_1p3shiQ,8373
|
|
123
123
|
pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
|
|
124
|
-
pyhw-0.15.
|
|
125
|
-
pyhw-0.15.
|
|
126
|
-
pyhw-0.15.
|
|
127
|
-
pyhw-0.15.
|
|
128
|
-
pyhw-0.15.
|
|
129
|
-
pyhw-0.15.
|
|
124
|
+
pyhw-0.15.3.dist-info/licenses/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
|
|
125
|
+
pyhw-0.15.3.dist-info/METADATA,sha256=2MgmAU1onwWHoFj-2UjpLXK-vDE8zEMBgRA1Hb4-mIc,7715
|
|
126
|
+
pyhw-0.15.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
127
|
+
pyhw-0.15.3.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
|
|
128
|
+
pyhw-0.15.3.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
|
|
129
|
+
pyhw-0.15.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|