升级版 from os import path TASKS_ROOT = path.dirname(path.abspath(path.dirname(__file__))) PYTHON_ROOT = '/usr/bin/python' job_workspace = path.join(TASKS_ROOT,'app').replace('\\', '/') from tempfile import mkstemp from os import fdopen,unlink,kill from…