pyblock/pybitblock/sysinf.py
GaltRanch 0a70a7260a Eliminate all star imports across the entire codebase
Replace every `from X import *` with explicit named imports:
- SPV/spvblock.py: 11 star imports resolved
- SPV/ppi.py: 4 star imports resolved, duplicate import removed
- SPV/nodeconnection.py, SPV/sysinf.py, SPV/apisnd.py, SPV/donation.py
- mempoolclock.py, sysinf.py, apisnd.py, donation.py

Removed unused imports (art, nodeconnection in donation, logos in apisnd).
Zero star imports remain in the project.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 12:13:33 -03:00

28 lines
1.1 KiB
Python

#Developer: Curly60e
#PyBLOCK its a clock of the Bitcoin blockchain.
import os
import subprocess
import psutil
import time as t
from pblogo import blogo
def clear(): # clear the screen
subprocess.run(['cls' if os.name=='nt' else 'clear'])
def sysinfoDetail(): #Cpu and memory usage
# gives a single float value
while True:
try:
clear()
blogo()
print(" \033[0;37;40m----------------------------")
print(" \033[3;33;40mCPU Usage: \033[1;32;40m" + str(psutil.cpu_percent()) + "\033[0;37;40m%")
print(" \033[3;33;40mMemory Usage: \033[1;32;40m" "{}\033[0;37;40m%".format(int(psutil.virtual_memory().percent)))
print(" \033[3;33;40mMemory Available: \033[1;32;40m" "{} \033[0;37;40mMB".format(int(psutil.virtual_memory().available / 1024 / 1024)))
print(" \033[3;33;40mDisk Usage: \033[1;32;40m" "{}%\033[0;37;40m%".format(psutil.disk_usage('/').percent))
print(" \033[0;37;40m----------------------------")
t.sleep(1)
except Exception:
break