jps is simple pub/sub system for python(v2.7 is supported now). It is very easy to install and it is easy to understand if you have experience of ROS(Robot Operating System).
see http://jps.readthedocs.org/
$ sudo pip install jps
If it fails, try below.
sudo apt-get install python2.7-dev
publisher.py
import jps
import time
pub = jps.Publisher('/hoge1')
i = 0
while True:
pub.publish('hello! jps{0}'.format(i))
i += 1
time.sleep(0.5)
subscriber.py
import jps
for msg in jps.Subscriber('/hoge1'):
print msg
You need three consoles.
$ jps_master
$ python publisher.py
$ python subscriber.py