Re: share dictionary between processes

2009-12-18 Thread Steve Holden
blumenkraft wrote: > Hi, > > I want to share dictionary between two distinct processes. > > > Something like this: > > first.py > import magic_share_module > > def create_dictionary(): > return {"a": 1} > > magic_share_module.share("shared_dictionary", > creator.create_dictionary) > while

Re: share dictionary between processes

2009-12-18 Thread Wolodja Wentland
On Thu, Dec 17, 2009 at 23:48 -0800, blumenkraft wrote: > I want to share dictionary between two distinct processes. > Something like this: > > first.py > import magic_share_module > def create_dictionary(): > return {"a": 1} > > magic_share_module.share("shared_dictionary", > creator.create_

Re: share dictionary between processes

2009-12-18 Thread r0g
blumenkraft wrote: > Hi, > > I want to share dictionary between two distinct processes. > > > Something like this: > > first.py > import magic_share_module > > def create_dictionary(): > return {"a": 1} > > magic_share_module.share("shared_dictionary", > creator.create_dictionary) > while

Re: share dictionary between processes

2009-12-18 Thread News123
Hi Michael, I'm new to the module multiprocessing, but at a first glance it seems, that multiprocessing.Value can only be shared if you create the second process from the first one. Id like to start the first process from the command line and much later the second process from the command line.

Re: share dictionary between processes

2009-12-18 Thread Michele Simionato
On Dec 18, 8:48 am, blumenkraft wrote: > Hi, > > I want to share dictionary between two distinct processes. > > Something like this: > > first.py > import magic_share_module > > def create_dictionary(): >     return {"a": 1} > > magic_share_module.share("shared_dictionary", > creator.create_dictio

Re: share dictionary between processes

2009-12-18 Thread garabik-news-2005-05
blumenkraft wrote: > Hi, > > I want to share dictionary between two distinct processes. > ... > I have looked at POSH, but it requires master process that will fork > childs. I want read-only sharing between completely unrelated > processes. > Is it possible? Depends on your exact needs - dbm o

share dictionary between processes

2009-12-17 Thread blumenkraft
Hi, I want to share dictionary between two distinct processes. Something like this: first.py import magic_share_module def create_dictionary(): return {"a": 1} magic_share_module.share("shared_dictionary", creator.create_dictionary) while True: pass second.py import magic_share_mod