System V shared memory in Python?

无人久伴 提交于 2019-12-18 11:54:06

问题


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


回答1:


Google finds sysv_ipc.




回答2:


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




回答3:


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




回答4:


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



来源:https://stackoverflow.com/questions/2219604/system-v-shared-memory-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!