12

How can I make use of the shmat(), shmdt(), shmctl(), shmget() calls from Python? Are they hidden somewhere in the standard library?

Update0

I'm after System V bindings that can be found in the Ubuntu repositories, or Python standard libraries (now or in future releases).

asked Feb 8, 2010 at 4:37

4 Answers 4

6

If you don't want to use any non-standard Python libraries, perhaps you could wrap the functions you need yourself using ctypes?

answered Sep 28, 2010 at 5:43
Sign up to request clarification or add additional context in comments.

Comments

4

Google finds sysv_ipc.

answered Feb 8, 2010 at 4:41

Comments

4

This page offers a feature matrix to help you choose between the posix_ipc, sysv_ipc, and shm modules.

answered Feb 8, 2010 at 4:43

4 Comments

Does an ubuntu package exist for this?
@MattJoiner , There is no ubuntu package but can be installed via pip: # pip install sysv_ipc
all 3 modules are absolutely trash, shm pypi page is empty, others 2 are not installable. And all 3 modules looks like abandoned. The best solution is to use ctypes
I did not have trouble installing the sysv_ipc with Python 3.8. It appears to work.
2

The processing package also supports shared memory objects, and works on unix/mac/windows.

answered Dec 20, 2010 at 9:20

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.