标签:result code cut port exec color pip str 读写
安装redis-py
读写数据:
import redis r=redis.StrictRedis(host=‘192.168.*.*‘,port=6379,db=0) r.hset("person:1", "name", "zhangsan") print(r.hget("person:1", "name"))#b‘zhangsan‘ pipe=r.pipeline() pipe.set("a","A") pipe.get("a") result=pipe.execute() print(result)#[True, b‘A‘]
标签:result code cut port exec color pip str 读写
原文地址:http://www.cnblogs.com/afraidToForget/p/6579573.html