To list top CPU usage processes.

Use below script to get top CPU usage processes,

Note: CPU usage refers to how longer a process using CPU.

import os;
load=os.popen('wmic cpu get loadpercentage /format:list').read();
print(load);
print('Top cpu consuming processes 
');
process=os.popen('tasklist /v /FI "CPUTIME gt 00:03:00"  | sort /R /+148').readlines();
try:
   for i in range(1,7,1):
       print (process[i]);
except:
    print("Finished");

sample output would be,