a popen question. Please help

Tim Chase python.list at tim.thechases.com
Sun Aug 30 14:17:08 CEST 2009


>>  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







More information about the Python-list mailing list