os.popen('top -n1').readlines()

Hm, interesting. On Mac OS X's (and BSD's?) top, -n instead specifies
the number of processes to list at a time (i.e. list only the top N
processes), which is entirely different.

[reaching over to my Mac] Looks like "top" there supports a -l parameter which does something similar.

Darn "standards" :-/

-tkc




--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to