On Thu, Jan 10, 2013 at 1:04 AM, Matt Beaumont-Gay <[email protected]> wrote: >> + >> + offset, length = getOffsetLength(filename, line_number, line_count) >> + with open(filename, 'r') as f: >> + text = f.read() >> + p = subprocess.Popen([binary, '-offset', str(offset), '-length', >> str(length), >> + '-style', style], >> + stdout=subprocess.PIPE, stderr=subprocess.PIPE, >> + stdin=subprocess.PIPE) >> + stdout, stderr = p.communicate(input=text) >> + if stderr: >> + print stderr > > print >>sys.stderr, stderr > > Or just hook up the subprocess's stderr to our stderr?
There's the risk of deadlock that speaks against that: http://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait This might be a Windows-only problem, but it's no fun to debug, trust me :-) - Kim _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
