- with open(cxxoutfile, 'w') as f:
- subprocess.check_call(cmd, stdin=subprocess.PIPE, stdout=f)
+ p = subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=0)
+ out, err = p.communicate()
+ with open(cxxoutfile, 'wb') as f:
+ f.write(out)