title: How to get current CPU and RAM usage in Python?
body: <p>How can I get the current system status (current CPU, RAM, free disk space, etc.) in Python? Ideally, it would work for both Unix and Windows platforms.</p>
  <p>There seems to be a few possible ways of extracting that from my search:</p>
  <ol>
  <li><p>Using a library such as <a href="http://www.psychofx.com/psi/trac/wiki/" rel="noreferrer">PSI</a> (that currently seems not actively developed and not supported on multiple platforms) or something like <a href="http://www.i-scream.org/pystatgrab/" rel="noreferrer">pystatgrab</a> (again no activity since 2007 it seems and no support for Windows).</p>
  </li>
  <li><p>Using platform specific code such as using a <code>os.popen(&quot;ps&quot;)</code> or similar for the *nix systems and <code>MEMORYSTATUS</code> in <code>ctypes.windll.kernel32</code> (see <a href="http://code.activestate.com/recipes/511491/" rel="noreferrer">this recipe on ActiveState</a>) for the Windows platform. One could put a Python class together with all those code snippets.</p>
  </li>
  </ol>
  <p>It's not that those methods are bad but is there already a well-supported, multi-platform way of doing the same thing?</p>