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. Advertisements

  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. Advertisements

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:
    532
  2. Carl Mackey

    mmap -- memory mapped file

    Carl Mackey, Jun 29, 2006, in forum: Python
    Replies:
    1
    Views:
    2,678
    Alex Martelli
    Jun 29, 2006
  3. Replies:
    3
    Views:
    434
    Walter Roberson
    Jan 10, 2006
  4. Replies:
    0
    Views:
    359
  5. Replies:
    8
    Views:
    575
    Keith Thompson
    Jan 10, 2006
  6. Divick

    memory mapped file stream

    Divick, Jan 19, 2006, in forum: C++
    Replies:
    6
    Views:
    999
    Darko Miletic
    Jan 31, 2006
  7. Replies:
    3
    Views:
    729
    Dietmar Kuehl
    Feb 23, 2006
  8. Chris Brooks

    memory mapped tar file contents

    Chris Brooks, Nov 13, 2008, in forum: Python
    Replies:
    1
    Views:
    467
    Aaron Brady
    Nov 13, 2008
Loading...