Skip to content

Instantly share code, notes, and snippets.

@pratikone
Created November 18, 2016 04:15
Show Gist options
  • Save pratikone/de68229a00bafd63ba05f69eb9d003d1 to your computer and use it in GitHub Desktop.
Save pratikone/de68229a00bafd63ba05f69eb9d003d1 to your computer and use it in GitHub Desktop.
import time
from subprocess import *
PATH = "/home/pratikone/Documents/git/redis/src/redis-cli"
string = "zadd sortie "
for i in xrange(1,1000001) :
string = string + str(i) + " richa" + str(i) + " "
if (i % 1000) == 0 :
print i
p1 = Popen([PATH], shell=True, stdin=PIPE)
print p1.communicate(input=string)
string = "zadd sortie "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment