472,106 Members | 1,296 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,106 software developers and data experts.

Re: Sharing common memory space (In form of List) across the pythonprocesses.



Piyush Chechani wrote:
>
Hi,

I am working on a module where I need to share contents of a big List
across the processes. I am using socket programming concept for this.

My current processing for this is as follows: -
1. There is a server program S which loads the list in the
memory, and listens on a particular port,
2. All the other programs which want to access that list sends a
request on that server port,
3. Server sends the id of the memory loaded list element to the
requesting process.
Here I am getting a problem in the reverse function of id(), as my
client should get the list object using its id but I don't know the
python function for doing this.
There intentionally is no such function. If by 'process', I believe you
should just send the object, which actually just sends an internal
reference to the object. If you mean OS process, look into interprocess
communication. 3.0 has a new multiprocessing module that might help.
Or have your server perform manipulations on the object.

Aug 1 '08 #1
0 920

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dhanvi | last post: by
1 post views Thread by Dave Booker | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.