Re: multiprocess passing arguments double asterisks

2016-10-26 Thread pic8690
On Monday, October 24, 2016 at 12:39:47 PM UTC-5, Thomas Nyberg wrote: > On 10/24/2016 12:45 PM, pic8...@gmail.com wrote: > > Thanks for the reply. > > > > The code snippet given by Peter is not very clear > > > > I would like to multiprocess a function which is written in python of the > > form b

Re: multiprocess passing arguments double asterisks

2016-10-24 Thread pic8690
On Sunday, October 23, 2016 at 3:44:16 PM UTC-5, Thomas Nyberg wrote: > On 10/23/2016 03:12 AM, pic8...@gmail.com wrote: > > import multiprocessing as mp > > > > def bar(**kwargs): > >for a in kwargs: > > print a,kwargs[a] > > > > arguments={'name':'Joe','age':20} > > p=mp.Pool(processes=

multiprocess passing arguments double asterisks

2016-10-23 Thread pic8690
import multiprocessing as mp def bar(**kwargs): for a in kwargs: print a,kwargs[a] arguments={'name':'Joe','age':20} p=mp.Pool(processes=4) p.map(bar,**arguments) p.close() p.join() Errors: Traceback (most recent call last): File "post.py", line 9, in p.map(bar,**arguments)

multiprocess passing arguments double asterisks

2016-10-23 Thread pic8690
import multiprocessing as mp def bar(**kwargs): for a in kwargs: print a,kwargs[a] arguments={'name':'Joe','age':20} p=mp.Pool(processes=4) p.map(bar,**arguments) p.close() p.join() Errors: Traceback (most recent call last): File "post.py", line 9, in p.map(bar,**arguments)