Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> I don't expect that Python will have a built-in core-counting function.
> You would probably need to ask the operating system. On Linux, you could
> do this:
>
> import os
> text = os.popen('cat /proc/cpuinfo').read()
>
>
> How you would do it in W
On Wed, 30 Jul 2008 11:22:12 -0700, John Nagle wrote:
> defn noob wrote:
>> How can I check how many cores my computer has? Is it possible to do
>> this in a Python-app?
>
> Why do you care? Python can't use more than one of them at
> a time anyway.
Why do you care why he cares? And he did
Single line using /proc/cpuinfo:
numprocs = [ int(line.strip()[-1]) for line in open('/proc/cpuinfo', 'r') if \
line.startswith('processor') ][-1] + 1
On Wed, Jul 30, 2008 at 2:16 PM, Dan Upton <[EMAIL PROTECTED]> wrote:
>
> On Wed, Jul 30, 2008 at 2:22 PM, John Nagle <[EMAIL PROTE
defn noob schrieb:
How can I check how many cores my computer has?
Is it possible to do this in a Python-app?
processing (http://pyprocessing.berlios.de/)
has an utility function processing.cpuCount().
Leo
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Jul 30, 2008 at 2:22 PM, John Nagle <[EMAIL PROTECTED]> wrote:
> defn noob wrote:
>>
>> How can I check how many cores my computer has?
>> Is it possible to do this in a Python-app?
>
>Why do you care? Python can't use more than one of them at
> a time anyway.
Per Python process, but
defn noob wrote:
How can I check how many cores my computer has?
Is it possible to do this in a Python-app?
Why do you care? Python can't use more than one of them at
a time anyway.
John Nagle
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 29, 7:44 pm, Mensanator <[EMAIL PROTECTED]> wrote:
> On Jul 29, 5:53 pm, defn noob <[EMAIL PROTECTED]> wrote:
>
> > How can I check how many cores my computer has?
> > Is it possible to do this in a Python-app?
>
> If you're using Windows, get PyWin32:
>
> win32api.GetSystemInfo
> tuple = Ge
On Jul 29, 5:53 pm, defn noob <[EMAIL PROTECTED]> wrote:
> How can I check how many cores my computer has?
> Is it possible to do this in a Python-app?
If you're using Windows, get PyWin32:
win32api.GetSystemInfo
tuple = GetSystemInfo()
Retrieves information about the current system.
Win32 API
On Tue, 29 Jul 2008 15:53:47 -0700, defn noob wrote:
> How can I check how many cores my computer has? Is it possible to do
> this in a Python-app?
Well you can try the functions in the 'platform' module, although in my
box(debian) nothing useful comes out. I don't think there's a simple &
port
On Tue, Jul 29, 2008 at 12:53 PM, defn noob <[EMAIL PROTECTED]> wrote:
> How can I check how many cores my computer has?
> Is it possible to do this in a Python-app?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
You can use the HAL interface from the DBUS module. See also the
gnome
How can I check how many cores my computer has?
Is it possible to do this in a Python-app?
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo