@@ -473,7 +473,7 @@ class Installer:
except AttributeError:
cwd = self.install_dir
- print("\nRunning '%s' in %s" % (command, cwd))
+ print("\nINSTALL: Running '%s' in %s" % (command, cwd))
if send_yes:
process = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE, cwd=cwd)
process.communicate("yes")
@@ -1,11 +1,15 @@
#!/usr/bin/env python
import argparse
+import sys
from benchmarker import Benchmarker
+from unbuffered import Unbuffered
###################################################################################################
# Main
+sys.stdout=Unbuffered(sys.stdout)
+
##########################################################
# Set up argument parser
@@ -0,0 +1,13 @@
+# Wrapper for unbuffered stream writing.
+# http://stackoverflow.com/a/107717/376366
+# Used to make sure print output appears in the correct order
+# in log files when spawning subprocesses.
+class Unbuffered:
+ def __init__(self, stream):
+ self.stream = stream
+ def write(self, data):
+ self.stream.write(data)
+ self.stream.flush()
+ def __getattr__(self, attr):
+ return getattr(self.stream, attr)