pyhw 0.10.0__py3-none-any.whl → 0.10.2__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 CHANGED
@@ -1 +1 @@
1
- __version__ = '0.10.0'
1
+ __version__ = '0.10.2'
@@ -2,7 +2,7 @@ from .logo import Logo
2
2
  from .color import ColorConfigSet, colorPrefix, colorSuffix, ColorSet
3
3
  from ..pyhwUtil import getOS
4
4
  from ..pyhwException import BackendException
5
- import os
5
+ import subprocess
6
6
  import re
7
7
 
8
8
 
@@ -57,7 +57,8 @@ class Printer:
57
57
  def __getColumns() -> int:
58
58
  if getOS() == "linux":
59
59
  try:
60
- _, columns_str = os.popen('stty size', 'r').read().split()
60
+ result = subprocess.run(['stty', 'size'], capture_output=True, text=True)
61
+ _, columns_str = result.stdout.split()
61
62
  columns = int(columns_str)
62
63
  except:
63
64
  columns = 80 # default terminal size is 80 columns
Binary file
pyhw/pyhwUtil/pyhwUtil.py CHANGED
@@ -2,6 +2,7 @@ import platform
2
2
  from ..backend import Data
3
3
  import os
4
4
  from dataclasses import dataclass
5
+ import subprocess
5
6
 
6
7
 
7
8
  def getOS():
@@ -59,7 +60,8 @@ class DataStringProcessor:
59
60
  def __getENV() -> int:
60
61
  if getOS() == "linux":
61
62
  try:
62
- _, columns_str = os.popen('stty size', 'r').read().split()
63
+ result = subprocess.run(['stty', 'size'], capture_output=True, text=True)
64
+ _, columns_str = result.stdout.split()
63
65
  columns = int(columns_str)
64
66
  except:
65
67
  columns = 80 # default terminal size is 80 columns
@@ -199,7 +201,8 @@ def selectOSLogo(os_id: str):
199
201
  else:
200
202
  return "linux"
201
203
  try:
202
- rows_str, columns_str = os.popen('stty size', 'r').read().split()
204
+ result = subprocess.run(['stty', 'size'], capture_output=True, text=True)
205
+ rows_str, columns_str = result.stdout.split()
203
206
  rows = int(rows_str)
204
207
  columns = int(columns_str)
205
208
  except:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyhw
3
- Version: 0.10.0
3
+ Version: 0.10.2
4
4
  Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
5
5
  Author-email: Xiao Ran <xiaoran.007@icloud.com>
6
6
  License: BSD-3-Clause
@@ -10,7 +10,7 @@ Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: License :: OSI Approved :: BSD License
12
12
  Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.8
13
+ Requires-Python: >=3.9
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
16
  Requires-Dist: pypci-ng>=0.1.3
@@ -26,7 +26,8 @@ Requires-Dist: pypci-ng>=0.1.3
26
26
  ![Static Badge](https://img.shields.io/badge/Windows-yellow)
27
27
 
28
28
  ![Static Badge](https://img.shields.io/badge/amd64-green)
29
- ![Static Badge](https://img.shields.io/badge/arm-blue)
29
+ ![Static Badge](https://img.shields.io/badge/aarch64-blue)
30
+ ![Static Badge](https://img.shields.io/badge/arm32-yellow)
30
31
  ![Static Badge](https://img.shields.io/badge/riscv64-%238A2BE2)
31
32
 
32
33
 
@@ -1,4 +1,4 @@
1
- pyhw/__init__.py,sha256=RYs3cR49NZ5Zwt0avo2mYyRcdWjLbrKBCHRHpqCJx24,23
1
+ pyhw/__init__.py,sha256=KniWsK3VleHLcYbbhl5YHxNYNRusZE0zJco_WyUvAwI,23
2
2
  pyhw/__main__.py,sha256=Gp50LaRF9vl_czdLNJRoa0OIzctLKhcZU0XH3EjNVjM,4741
3
3
  pyhw/backend/__init__.py,sha256=knn_3Yroow1h0dqdrozk3zyy3vz-kQyNBRjR6OLmVoY,50
4
4
  pyhw/backend/backendBase.py,sha256=mloo8mPEbgbIdmyQ3I4vdEXMSSjxWi_wnwACmzvHbEo,506
@@ -75,7 +75,7 @@ pyhw/backend/uptime/uptimeBase.py,sha256=HVRFZHO-2F_UKH0ti9wR16iHCH7Q8dga0HfxFxU
75
75
  pyhw/backend/uptime/uptimeInfo.py,sha256=TobPEV3MBT3Fiv3W6TOzD3a4MNW-vz2Oi_Trlcihu7k,114
76
76
  pyhw/backend/uptime/windows.py,sha256=fRj218K9gx2Ffg8_dEjWyaFrqFl-niiPHvJjwJhfGeM,1744
77
77
  pyhw/frontend/__init__.py,sha256=xgv_iVv9w4cLXklbdtFWXu7J7KJxBCUw-ZcUQb_abFc,57
78
- pyhw/frontend/frontendBase.py,sha256=rPAf7tE1u8uGgZ-mDTOw_O2S2-YsevEzGJsq34eJlXQ,4957
78
+ pyhw/frontend/frontendBase.py,sha256=_hweaSg9KSQwhgHVUyGYpmRmhljLkKtJXMyVJDZuHgs,5035
79
79
  pyhw/frontend/color/__init__.py,sha256=xk511qWwdYWEVjk_zOaC4fs81HtwR4ELr3wi1tTL824,191
80
80
  pyhw/frontend/color/colorConfig.py,sha256=hvpA9R4ajAbqZ0bVq5hOs0PXtTF00ViZ_qXLbBJ1DWU,6225
81
81
  pyhw/frontend/color/colorSet.py,sha256=spH8PlRu7capouf-yUgDHgoPCnM5aJ_ncascISZfz2g,1421
@@ -99,15 +99,15 @@ pyhw/frontend/logo/ascii/windows_10.pyhw,sha256=jv5pzZs_CdOzpeTjyXfXJWcTQwK-J0LN
99
99
  pyhw/frontend/logo/ascii/windows_11.pyhw,sha256=VuQTzbBabaEQhm2JBVhy6Ja6lClUGacQsaiNUih9nhU,656
100
100
  pyhw/frontend/logo/ascii/windows_2025.pyhw,sha256=o8eWsiyhNpDoEjiWFiBMfkd-8MdIslGc1Jpm85LU4P8,643
101
101
  pyhw/frontend/logo/ascii/windows_old.pyhw,sha256=AMsvWAZ50HM8lweWEmzDWbRNDGkKFJo9qLY_VRKrciY,580
102
- pyhw/library/lib/iokitGPULib.dylib,sha256=DcJ0GZY79gTFckLFYtZgeKn1T0NFvdO_k_ccCa7od5Y,154808
102
+ pyhw/library/lib/iokitGPULib.dylib,sha256=KAz0VyeRspD3U7WeedUnPvJVUZEKn_Pw0AKk5zm42ZM,154808
103
103
  pyhw/pyhwException/__init__.py,sha256=8JsFvtF13g0Y5t4z9fRndDXtfCzuBM59jDf6PhWSFSk,220
104
104
  pyhw/pyhwException/pyhwException.py,sha256=wxuzFQa9g7XB1q9TUKO_55lw7wMEJMpzG8w1GVTFVa0,197
105
105
  pyhw/pyhwUtil/__init__.py,sha256=diIqlNUBfuHu-2VAOJk5nipGLafnWxR3chAAOmX8QRo,250
106
- pyhw/pyhwUtil/pyhwUtil.py,sha256=h4Xz0heMrBoj2ViHyWmWUNcWmIZlxAmMhqZXskEHpTU,6765
106
+ pyhw/pyhwUtil/pyhwUtil.py,sha256=TxAgsDlrz-AJFyeXnOjL1MVnh1uR9dEqli5dmYPZcog,6915
107
107
  pyhw/pyhwUtil/sysctlUtil.py,sha256=S-rUvqi7ZrMyMouIhxlyHEQ4agM7sCT1Y7uzs3Hu5-o,841
108
- pyhw-0.10.0.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
109
- pyhw-0.10.0.dist-info/METADATA,sha256=CCpHUPKmL57ySsW9fPxag_Ef-Mkv8ClP7k_Z2gT8HKc,6669
110
- pyhw-0.10.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
111
- pyhw-0.10.0.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
112
- pyhw-0.10.0.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
113
- pyhw-0.10.0.dist-info/RECORD,,
108
+ pyhw-0.10.2.dist-info/LICENSE,sha256=hJs6RBqSVCexbTsalkMLNFI5t06kekQEsSVaOt_-yLs,1497
109
+ pyhw-0.10.2.dist-info/METADATA,sha256=NlYsXDWh6YlpRrkrC0Z4HKu1IsXmxAE0zcLevOMYPqw,6732
110
+ pyhw-0.10.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
111
+ pyhw-0.10.2.dist-info/entry_points.txt,sha256=q-AB8im_QahpmNrmy4aPTJRGi0LlbNlnI3kF7s6pKss,44
112
+ pyhw-0.10.2.dist-info/top_level.txt,sha256=7Inxvxt1TngEricKZEex9_WJZS3DbKYFUXDz4v5WHYU,5
113
+ pyhw-0.10.2.dist-info/RECORD,,
File without changes
File without changes