Counting processors
Mike Meyer
mwm at mired.org
Tue Jul 26 23:58:26 EDT 2005
"k pur" <4krishan at gmail.com> writes:
> You can use
>
> print os.sysconf("SC_NPROCESSORS_CONF")
>
> works on Linux
Works on FreeBSD as well. It hooks up to the sysconf C call. That's a
Posix call, so this should work portably across Posix systems. I know
Windows can be made Posix compliant, but I'm no sure how much of that
functionality you get out of the box.
<mike
--
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list
mailing list