Exchanging data with a C program using shared memory (sysV IPC)

A

Al

Hello,

I want my python application to communicate with an legacy C program which
read/write data in a shared memory (Unix Sys V IPC).

It seems that there are no official shm nor sysV ipc module, and that
non-official ones are dead. I can't modify the C code to change its
communication method.

How would you solve this problem using python ?
Is there any reason there is no official shm for python ?


I could write a C code which communicates with my python application
using mmap or something else and with the old C code using shmat(), but
this is a rather ugly solution.

Thanks in advance.
 
S

slacker

Al said:
I want my python application to communicate with an legacy C program which
read/write data in a shared memory (Unix Sys V IPC).

Have you looked at the dl module? Types and portability aside, it
might provide you with what you need.

Cheers,

- slacker
 
A

Al

Hello slacker,
Have you looked at the dl module? Types and portability aside, it
might provide you with what you need.

Cheers,

- slacker

Thank you very much for your advice. I didn't use the dl module, but
searching information on dl, led me to the 'new' ctype one which
is perfect for my use.
 

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

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top