修改部分常量定义
增加编译功能
This commit is contained in:
@@ -1 +1,14 @@
|
||||
# coding=utf-8
|
||||
import commands
|
||||
|
||||
|
||||
class CompileError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def compile_(language_item, src_path, exe_path):
|
||||
command = language_item["compile_command"].format(src_path=src_path, exe_path=exe_path)
|
||||
status, output = commands.getstatusoutput(command)
|
||||
if status:
|
||||
raise CompileError(output)
|
||||
return exe_path
|
||||
|
||||
Reference in New Issue
Block a user