Counting processors
Tim Golden
tim.golden at viacom-outdoor.co.uk
Tue Jul 26 10:58:48 EDT 2005
[k pur]
| You can use
|
| print os.sysconf("SC_NPROCESSORS_CONF")
|
| works on Linux
|
|
| krishan
|
|
| Pauldoo wrote:
| > Hi,
| > Is a way in python to obtain the total number of processors
| present in
| > the system?
| >
| > os.platform doesn't seem to contain anything useful.
And on Windows (2000, at least):
import os
print os.environ['NUMBER_OF_PROCESSORS']
does the trick.
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-list
mailing list