Memory mapped File (Python win32 extensions)

  • Thread starter Srijit Kumar Bhadra
  • Start date
S

Srijit Kumar Bhadra

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
 
T

Thomas Heller

Srijit Kumar Bhadra said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top