Use a PIPE to pass stdin to the executable in src/sorting/scaling.py.
authorW. Trevor King <wking@drexel.edu>
Mon, 25 Oct 2010 14:42:49 +0000 (10:42 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 25 Oct 2010 14:42:49 +0000 (10:42 -0400)
src/sorting/scaling.py

index 0d8d6d2d220b7f8f00ae379de761ceae4fc30382..c62dc31b33d51d7d2e3998317ce72d4e49c8ce92 100755 (executable)
@@ -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: