Пример #1
0
def run_compile(subs_compiler_command, runner):
    src = source_code.get_full_source(runner)

    compile_process = subprocess.Popen(
        subs_compiler_command,
        stdin=subprocess.PIPE,
        stderr=subprocess.PIPE,
        encoding="utf8",
    )

    stdout_data, stderr_data = compile_process.communicate(input=src)

    if compile_process.returncode == 0:
        return None

    out = ""

    if stdout_data is not None:
        out += stdout_data

    if stderr_data is not None:
        out += stderr_data

    if out == "":
        return "Unknown compile error - compiler did not write any output."

    return out
Пример #2
0
def run_compile(subs_compiler_command, runner):
    # print "$ " + ( " ".join( subs_compiler_command ) )
    compile_process = subprocess.Popen(subs_compiler_command, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
    stdoutdata, stderrdata = compile_process.communicate(source_code.get_full_source(runner))

    if compile_process.returncode == 0:
        return None
    elif stdoutdata is not None:
        if stderrdata is not None:
            return stdoutdata + stderrdata
        else:
            return stdoutdata
    else:
        if stderrdata is not None:
            return stderrdata
        else:
            return "Unknown compile error - compiler did not write any output."
Пример #3
0
def run_compile( subs_compiler_command, runner ):
	#print "$ " + ( " ".join( subs_compiler_command ) )
	compile_process = subprocess.Popen( subs_compiler_command,
		stdin = subprocess.PIPE, stderr = subprocess.PIPE )
	stdoutdata, stderrdata = compile_process.communicate(
		source_code.get_full_source( runner ) )

	if compile_process.returncode == 0:
		return None
	elif stdoutdata is not None:
		if stderrdata is not None:
			return stdoutdata + stderrdata
		else:
			return stdoutdata
	else:
		if stderrdata is not None:
			return stderrdata
		else:
			return "Unknown compile error - compiler did not write any output."
Пример #4
0
def dot_L( runner ):
	print source_code.get_full_source( runner )
	return False, False
Пример #5
0
def dot_L(runner):
    print source_code.get_full_source(runner)
    return False, False