Parallel python + ??

Thor thor__00 at yahoo.com
Wed Jun 11 09:57:52 EDT 2008


Gerhard Häring wrote:

> This is of course OS-specific. On Linux, you can parse the proc
> filesystem:
> 
>  >>> open("/proc/%i/stat" % os.getpid()).read().split()[39]
> 
> You can use the "taskset" utility to query or set CPU affinity on Linux.
> 
It is going to be in Linux (mainly) I was thinking about something like
this:

import Module

def process(self):
  print "I am running on processor", Module.cpu,"core", Module.core
  ....
....

Checking the raskset right now...:) Thanks.



More information about the Python-list mailing list