main.py
def compile_code(target: str, src: str) -> tuple:
    """
    compile_code takes in @src (a .c source file), and compile it into
    a @target executable

    TODO: Error checking using the c_stderr to ensure that the code
    compiles and an exectuable is created. else notify

    """

    cmd = f"gcc -Wall -o {target} {src}"

    process = subprocess.Popen(cmd,
                               bufsize=-1,
                               close_fds=True,
                               shell=True,
                               # preexec_fn=os.setsid,
                               stdin=subprocess.PIPE,
                               stdout=subprocess.PIPE,
                               stderr=subprocess.PIPE)

    (c_stdout, c_stderr) = process.communicate()

    c_status = process.returncode
    return (c_stdout, c_stderr, c_status)

    compile_code takes in @src (a .c source file), and compile it into
    a @target executable

    TODO: Error checking using the c_stderr to ensure that the code
    compiles and an exectuable is created. else notify

    
compile_code takes in @src (a .c source file), and compile it into
a @target executable

Error checking using the c_stderr to ensure that the code
compiles and an exectuable is created. else notify
compile_code takes in @src ( a . c source file ) and compile it into a @target executable Error checking using the c_stderr to ensure that the code compiles and an exectuable is created . else notify
def compile_code(target: str, src: str) -> tuple:
    cmd = f"gcc -Wall -o {target} {src}"
    process = subprocess.Popen(cmd,
                               bufsize=-1,
                               close_fds=True,
                               shell=True,
                               stdin=subprocess.PIPE,
                               stdout=subprocess.PIPE,
                               stderr=subprocess.PIPE)
    (c_stdout, c_stderr) = process.communicate()
    c_status = process.returncode
    return (c_stdout, c_stderr, c_status)
def compile_code ( target : str , src : str ) -> tuple : cmd = f"gcc -Wall -o {target} {src}" process = subprocess . Popen ( cmd , bufsize = - 1 , close_fds = True , shell = True , stdin = subprocess . PIPE , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) ( c_stdout , c_stderr ) = process . communicate ( ) c_status = process . returncode return ( c_stdout , c_stderr , c_status )
compile_code takes in @src (a .c source file), and compile it into
a @target executable
compile_code takes in @src ( a . c source file ) and compile it into a @target executable
"""
    compile_code takes in @src (a .c source file), and compile it into
    a @target executable

    TODO: Error checking using the c_stderr to ensure that the code
    compiles and an exectuable is created. else notify

    """ # preexec_fn=os.setsid,
target
str
src
str