[root@VM_2_29_centos ~]# workon
blog
Joyo
testdata
[root@VM_2_29_centos ~]# workon Joyo(Joyo)[root@VM_2_29_centos ~]# python[root@VM_2_29_centos ~]# python3
Python 3.6.4(default, Mar 162018,22:27:18)[GCC 4.8.520150623(Red Hat 4.8.5-16)] on linux
Type "help","copyright","credits"or"license"for more information.>>>>>>from redis import*>>> sr = StrictRedis(host='localhost', port=6379, db=0)>>> sr
StrictRedis<ConnectionPool<Connection<host=localhost,port=6379,db=0>>>>>> res = sr.set("name","python")>>>print(res)True>>> res1 = sr.get("name")>>>print(res1)b'python'>>>