You can use the psutil library in Python to get the system CPU usage.
Here's an example code block:
main.py99 chars7 linesThe psutil.cpu_percent() function returns a float representing the current CPU utilization as a percentage.
gistlibby LogSnag