python making a live output of cpu usage
<p>So I would like to make a python program that displays the computers cpu usage in real time. So far I am using the psutil module to find cpu usage but I'm not sure how to represent the output visualy.</p>

<pre><code>import psutil
x=(2)
while x&gt;0:
    cpu = psutil.cpu_percent(interval=1, percpu=False)
    print(cpu)
</code></pre>

<p>I was wondering if anyone had any ideas on how i could display the results.</p>

<p>tkinter is a simple gui package that comes bundled with python. You could use that.</p>

<p>Or you could <code>sys.stdout.write</code>  to print the result without a <code>\n</code> every second or so, with <code>\r</code> at the beginning to bring the character cursor to the beginning of the line. This would make a refreshing single line terminal display.</p>

python psutil