TIPC in Python

A few days ago, i hacked together a small example how to do basic IPC using TIPC in a Python environment. I didn’t bother with an elaborate service addressing scheme, it’s just using the local PID to index services and the TIPC names are hardcoded.

You register a callback function as:

from tipc import tipc

def callback(msg):
	print msg

tipc.setup(callback)

Sending a message to another python process:

tipc.send("Hello unicast", os.getpid())

Or, send to everyone:

tipc.sendall("Hello multicast")

Full example can be found here: https://github.com/Hugne/tipc_python/tree/master/