468,766 Members | 1,457 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,766 developers. It's quick & easy.

Memory mapped File (Python win32 extensions)

Hello,
I see that it is possible to use mmapfile.pyd of win32all. The same is
mentioned in http://www.python.org/windows/win32/#mmapfile.

Unfortunately I could not trace any example using mmapfile.

Any example or link to an example will be of help. I am interested to
learn how to achieve efficient sharing of data between separate
processes using mmapfile.

Regards,
/Srijit

Jul 18 '05 #1
1 2684
"Srijit Kumar Bhadra" <sr****@yahoo.com> writes:
Hello,
I see that it is possible to use mmapfile.pyd of win32all. The same is
mentioned in http://www.python.org/windows/win32/#mmapfile.

Unfortunately I could not trace any example using mmapfile.

Any example or link to an example will be of help. I am interested to
learn how to achieve efficient sharing of data between separate
processes using mmapfile.


You can even create a shared memory mapped file for sharing data
between processes on Windows in pure Python. It's not really obvious
from the mmap description, but calling

shmem = mmap.mmap(0, 32000, "spam")

creates (or opens, if it already exists) a shared memory block,
not based an any existing file. In other words, the fileno (first
parameters) must be 0, and the last one specifies the system wide name
of the shared memory block.

Thomas
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Phil Schmidt | last post: by
6 posts views Thread by Luc Saffre | last post: by
2 posts views Thread by Joel Foner | last post: by
3 posts views Thread by James Aguilar | last post: by
1 post views Thread by Carl Mackey | last post: by
1 post views Thread by PMarino | last post: by
3 posts views Thread by Frank Rizzo | last post: by
1 post views Thread by Chris Brooks | last post: by
reply views Thread by Chris Brooks | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.