Created
June 4, 2015 07:38
-
-
Save nekoya/db2c42612da20c3f785f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
import time | |
p = subprocess.Popen( | |
('redis-server', '--port', '6379', '--bind', '127.0.0.1'), | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE) | |
WAIT = 0.001 | |
for i in xrange(100): | |
if p.poll() is not None: | |
print WAIT * i | |
sys.exit(0) | |
time.sleep(WAIT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment