标签:
直接外部传入参数:
import subprocess import os def compile(sdk, mainPath, configPath=None, callback=None): os.chdir(sdk + "/bin/") cmdName = ‘mxmlc‘ args = cmdName + " " + mainPath + " " if configPath: f = open(configPath) conf = f.read() conf = conf.replace("\r", "") conf = conf.replace("\n", " ") args += conf print args sp = subprocess.Popen(args) sp.wait() if callback: callback()
配置文件的参数见 application compiler options
标签:
原文地址:http://www.cnblogs.com/greatxin/p/4642190.html