Skip to content

Instantly share code, notes, and snippets.

@neilmock
Created June 11, 2010 20:42
Show Gist options
  • Save neilmock/435010 to your computer and use it in GitHub Desktop.
Save neilmock/435010 to your computer and use it in GitHub Desktop.
from redis import Redis
r = Redis()
r.publish("greeting", "Neil")
from redis import Redis
r = Redis()
r.subscribe("greeting")
for message in r.listen():
if message['type'] == 'message':
print "Greetings, %s" % message['data']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment