Skip to content

Commit

Permalink
added gcc output
Browse files Browse the repository at this point in the history
  • Loading branch information
dkohlbre committed Nov 19, 2014
1 parent 8d594e1 commit 782231d
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions cats.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,23 @@ def gcc_build(args):
if args.libfile != '':
gccstring += args.libfile+" "
gccstring +=args.tmpfile
proc = subprocess.Popen(gccstring,shell=True)
return 0
proc = subprocess.Popen(gccstring,shell=True,stdout=subprocess.PIPE,stderr=subprocess.PIPE)

while proc.returncode == None:
(stdout,stderr) = proc.communicate()
if stdout is not None or stderr is not None:
for l in stdout.split('\n'):
if l != '':
print "[GCC] "+l
for l in stderr.split('\n'):
if l != '':
print "[GCC] "+l

if proc.returncode < 0:
print_info("Building failed!")
elif proc.returncode > 0:
print_info("Building has problems...")
return proc.returncode

def c_snippet(args):

Expand Down

0 comments on commit 782231d

Please sign in to comment.