[Tutor] Shared Memory [IPC / pyserial]

Danny Yoo dyoo@hkn.eecs.berkeley.edu
Sun Dec 29 18:50:02 2002


On Sat, 28 Dec 2002, Antony Benjamin wrote:

>   Can I use shared memory and semaphores (shmget,semget etc)in a python
> program.Currently I am using Linux Platform.I also like to know whether
> it is possible to call a python program/module in a C program in Unix
> platform.

Hi Antony,

Sorry for the late reply!  I was hoping someone else would touch this,
since I have no experience with IPC issues.  Still, I'm up for googling
some of this up... *grin*


Someone has written a module to get access to shared memory and
semaphores:

    http://gigue.peabody.jhu.edu/~mdboom/omi/source/shm_source/shm.html


> What are the different forms of IPC used in Python

The C2 Wiki page does have a section on Python IPC:

    http://c2.com/cgi/wiki?PythonIpc


There was also a thread on the main Python-list (comp.lang.python) that
might be useful for you:

    http://mail.python.org/pipermail/python-list/2002-September/120900.html




> I also like to know how to access modem(RS232) via python program and
> also how to set baud rates for serial ports.Is this platform dependent?

Here you go:

    http://pyserial.sourceforge.net/

'pyserial' is a module that tries to provide a nice, platform independent
way to access serial ports in Python.


Good luck to you!