2012-05-30 50 views
0

http://nullege.com/codes/search/redis.Redis.send_commandRedis的send_command錯誤未找到

使用Redis的和下面的教程在嘗試這個例子:

results = r.send_command(
     'ZRANGEBYSCORE %s 0 %s LIMIT 0 %s\r\n' % (
      qk, 
      ts, 
      limit 

在我的情況下我得到:

Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
AttributeError: 'Redis' object has no attribute 'send_command' 
+0

你的'r'是什麼?它來自哪裏? –

+0

from:r = redis.Redis() – badc0re

回答