From: W. Trevor King Date: Mon, 25 Oct 2010 14:42:49 +0000 (-0400) Subject: Use a PIPE to pass stdin to the executable in src/sorting/scaling.py. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8b699b45fb025be6e1673a40f9f00277105faffb;p=parallel_computing.git Use a PIPE to pass stdin to the executable in src/sorting/scaling.py. --- diff --git a/src/sorting/scaling.py b/src/sorting/scaling.py index 0d8d6d2..c62dc31 100755 --- a/src/sorting/scaling.py +++ b/src/sorting/scaling.py @@ -40,7 +40,7 @@ def run_test(executable, stdin=True, data_filename=None): contents = f.read() start = time.time() if stdin: - p = subprocess.Popen([executable], + p = subprocess.Popen([executable], stdin=subprocess.PIPE, stdout=open('/dev/null', 'w')) p.communicate(contents) else: