apps/cc/test/arcacc.py
def compile_file(filename):
    """compiles 'filename' and returns the standard output and error"""
    proc = popen(["../cc", filename])
    exitcode = proc.wait()
    if exitcode < 0:
        return (None, "compiler crash " + filename)
    if exitcode != 0:
        return (None, "compiler failed: " + filename)
    err = ""
    for line in proc.stderr:
        err += line
    out = ""
    for line in proc.stdout:
        out += line

    return (out, err)
compiles 'filename' and returns the standard output and error
compiles 'filename' and returns the standard output and error
compiles ' filename ' and returns the standard output and error
def compile_file(filename):
    proc = popen(["../cc", filename])
    exitcode = proc.wait()
    if exitcode < 0:
        return (None, "compiler crash " + filename)
    if exitcode != 0:
        return (None, "compiler failed: " + filename)
    err = ""
    for line in proc.stderr:
        err += line
    out = ""
    for line in proc.stdout:
        out += line
    return (out, err)
def compile_file ( filename ) : proc = popen ( [ "../cc" , filename ] ) exitcode = proc . wait ( ) if exitcode < 0 : return ( None , "compiler crash " + filename ) if exitcode != 0 : return ( None , "compiler failed: " + filename ) err = "" for line in proc . stderr : err += line out = "" for line in proc . stdout : out += line return ( out , err )
compiles 'filename' and returns the standard output and error
compiles ' filename ' and returns the standard output and error
"""compiles 'filename' and returns the standard output and error"""
filename