[BangPypers] CPU Info
Ramakrishna Reddy
ramkrsna at gmail.com
Wed Dec 16 12:04:54 CET 2009
On Wed, Dec 16, 2009 at 4:19 PM, Baiju M <mbaiju at zeomega.com> wrote:
> Hi,
> Is there any module available in Python (third party is fine)
> to get the number processors available in a multi-core system ?
> I would prefer something works cross-platform.
For 2.6 above, you might wanna take a look at multiprocessing module
>>> import multiprocessing
>>> multiprocessing.cpu_count()
2
--
Ramakrishna Reddy GPG
Key ID:31FF0090
Fingerprint = 18D7 3FC1 784B B57F C08F 32B9 4496 B2A1 31FF 0090
More information about the BangPypers
mailing list