Better utilization of duo-core?

Discussion in 'Python' started by John Henry, Jul 13, 2006.

  1. John Henry

    John Henry Guest

    Hi list,

    I have a Python ap that starts another non-Pythoon ap for number
    crunching. My new notebook comes with a duo-core CPU. I tried
    manually running 2 copies of my ap at the same time) and it appears to
    run the whole job faster (or at least the CPU loading level as show by
    the task manager appears so). So, I want my Python code to do this
    automatically.

    How do I detect whether I have additional CPUs in the system? The
    google search turns up answer about a Sun workstation but not Windows
    XP.

    Thanks,
     
    John Henry, Jul 13, 2006
    #1
    1. Advertising

  2. John Henry wrote:

    > How do I detect whether I have additional CPUs in the system? The
    > google search turns up answer about a Sun workstation but not Windows
    > XP.


    count = int(os.environ.get("NUMBER_OF_PROCESSORS", 1))

    </F>
     
    Fredrik Lundh, Jul 13, 2006
    #2
    1. Advertising

  3. Fredrik Lundh, Jul 13, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jay Kavimandan

    Memory utilization for Windows services

    Jay Kavimandan, Oct 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,492
    Prasad
    Nov 2, 2004
  2. Replies:
    5
    Views:
    1,417
    Leo jay
    Nov 17, 2006
  3. jim-on-linux
    Replies:
    1
    Views:
    250
    Aaron Brady
    Dec 11, 2008
  4. Gyoung-Yoon Noh
    Replies:
    1
    Views:
    99
    James Britt
    Dec 24, 2005
  5. winter heat
    Replies:
    2
    Views:
    107
    Brian Candler
    Nov 2, 2010
Loading...

Share This Page