<p>I'm trying:</p>

<pre><code>import commands
print commands.getoutput("ps -u 0")
</code></pre>

<p>But it doesn't work on os x.
os instead of commands gives the same output:
USER   PID %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND</p>

<p>nothing more</p>

It works if you use os instead of commands:
```
```
import os
print os.system("ps -u 0")
```
```