New submission from ndbecker :
from multiprocessing import Pool
def power (x, pwr=2):
return x**pwr
import functools
run_test = functools.partial (power, pwr=3)
if __name__ == "__main__":
pool = Pool()
cases = [3,4,5]
results = pool.map (run_test, cases)
TypeE
New submission from ndbecker :
I'd like to suggest some improvements from mmap
1) mmap assign to slice only accepts a string. This is unfortunate,
because AFAIK a string can only be created by copying data, and this is
wasteful for large data transfers. mmap should accept any o
ndbecker <[EMAIL PROTECTED]> added the comment:
OK.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2712>
__
___
Python-bugs-list mailing list
ndbecker <[EMAIL PROTECTED]> added the comment:
On Monday 28 April 2008, Martin v. Löwis wrote:
> Martin v. Löwis <[EMAIL PROTECTED]> added the comment:
>
> Passing structures is certainly possible. I'd try
>
> args = struct.pack("iP", len(c), cast (poin
ndbecker <[EMAIL PROTECTED]> added the comment:
On Monday 28 April 2008, Martin v. Löwis wrote:
> Martin v. Löwis <[EMAIL PROTECTED]> added the comment:
> > IIUC, current ioctl is not capable of handling arbitrary argument
> > types.
>
> Can you please be a bit
New submission from ndbecker <[EMAIL PROTECTED]>:
IIUC, current ioctl is not capable of handling arbitrary argument
types.
This code will allow any arg type (such as structures with pointers to
embedded structures).
The code for _IOC is taken from linux and might not be portable.