Memory mapped File (Python win32 extensions)

Discussion in 'Python' started by Srijit Kumar Bhadra, Mar 17, 2005.

  1. 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
    Srijit Kumar Bhadra, Mar 17, 2005
    #1
    1. Advertising

  2. "Srijit Kumar Bhadra" <> 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
    Thomas Heller, Mar 17, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    415
  2. Carl Mackey

    mmap -- memory mapped file

    Carl Mackey, Jun 29, 2006, in forum: Python
    Replies:
    1
    Views:
    2,557
    Alex Martelli
    Jun 29, 2006
  3. Replies:
    3
    Views:
    291
    Walter Roberson
    Jan 10, 2006
  4. Replies:
    0
    Views:
    263
  5. Replies:
    8
    Views:
    394
    Keith Thompson
    Jan 10, 2006
Loading...

Share This Page