"k pur" <[EMAIL PROTECTED]> 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
Or maybe
os.sysconf('SC_NPROCESSORS_ONLN')
Usually, the value returned by os.sysconf('SC_NPROCESSORS_ONLN') and
os.sysconf('SC_NPROCESSORS_CONF') are the same, but if they do differ,
os.sysconf('SC_NPROCESSORS_ONLN') is the reliably figure.
/Jean Brouwers
PS) This applies to Linux and Solari
[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 W
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.
--
http://mail.python.org/mailman/listinfo/python-
[Pauldoo]
> Is a way in python to obtain the total number of processors present in
> the system?
On windows,
List Processor Information.
Description: Returns information about the processors installed on a
computer.
http://www.microsoft.com/technet/scriptcenter/scripts/Python/hardware/basic/hwb
Yeh well I know of /proc/cpuinfo (due to linux's hacked up non-unix
/proc, *grumble*) and the NUMBER_OF_PROCESSORS environment variable on
windows. I was just hoping for a slightly more platform independant
way of doing it.
--
http://mail.python.org/mailman/listinfo/python-list
Pauldoo wrote:
> Is a way in python to obtain the total number of processors present in
> the system?
I don't know of a platform independent way. If you specify one or more
platforms, I'm sure someone will be able to help.
--
Benji York
--
http://mail.python.org/mailman/listinfo/python-list
I don't think there is direct method. On Linux you can inspect file
/proc/cpuinfo to determine the installed cpus.
--
http://mail.python.org/mailman/listinfo/python-list