Skip to content

Instantly share code, notes, and snippets.

@evilkost
Created August 13, 2010 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evilkost/522955 to your computer and use it in GitHub Desktop.
Save evilkost/522955 to your computer and use it in GitHub Desktop.
import brukva
c = brukva.Client()
c.connect()
#c.select(9)
p = c.pipeline()
p.set('foo', 'bar')
p.get('foo')
p.sadd('zar', '1')
p.sadd('zar', '4')
p.smembers('zar')
def on_resp(res):
print(repr(res))
from functools import partial
c._io_loop.add_callback(partial( p.execute, [on_resp,] ))
c.connection._stream.io_loop.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment