标签:
python连接redis
import redis
r =redis.Redis(host=‘192.168.199.11‘,port = 6379 ,db = 0)
r.publish(‘chan_107‘,‘ni hao a ‘)
监听 :
redis-cli
SUBSCRIBE chan_107
python,redis简单订阅
原文地址:http://www.cnblogs.com/bingliang/p/5170312.html