MCPcopy
hub / github.com/alibaba/freeline / cexec

Function cexec

freeline_core/utils.py:22–35  ·  view source on GitHub ↗
(args, callback=None, add_path=None, cwd=None)

Source from the content-addressed store, hash-verified

20
21
22def cexec(args, callback=None, add_path=None, cwd=None):
23 env = None
24 if add_path:
25 import copy
26 env = copy.copy(os.environ)
27 env['PATH'] = add_path + os.path.pathsep + env['PATH']
28 p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, env=env, cwd=cwd)
29 output, err = p.communicate()
30 code = p.returncode
31
32 if code != 0 and callback:
33 callback(args, code, output, err)
34 else:
35 return output, err, code
36
37
38def curl(url, body=None):

Callers 15

executeMethod · 0.90
run_aaptMethod · 0.90
_check_connectionMethod · 0.90
_install_apkMethod · 0.90
_debug_appMethod · 0.90
_launch_applicationMethod · 0.90
executeMethod · 0.90
run_aapt_taskMethod · 0.90
run_javac_taskMethod · 0.90
run_dex_taskMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected