Setting CPU Affinity

  • Thread starter Laughlin, Joseph V
  • Start date
L

Laughlin, Joseph V

When I spawn a new process via spawnv(), how can I set the CPU affinity
for the newly-spawned process with python?

Thanks,

Joe Laughlin
Phantom Works - Integrated Technology Development Labs
The Boeing Company
 
M

Mark Hammond

When I spawn a new process via spawnv(), how can I set the CPU affinity
for the newly-spawned process with python?

The pywin32 (win32all) extensions include the win32 functions for this
in the win32process module. You should be able to:
* use spawmv to get the new process ID.
* use win32process.OpenProcess() to get a process handle.
* use win32process.SetProcessAffinityMask() to set the affinity.

Mark.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top