Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
run Namespace Reference

Namespaces

namespace  api
 

Functions

 run (cmd)
 

Variables

str PYTHON_VERSION_COMPATIBILITY = "PY3"
 
list DEPS
 

Function Documentation

◆ run()

run.run (   cmd)

Definition at line 14 of file run.py.

14def run(cmd):
15 bindir = os.path.dirname(cmd[0]);
16 env = os.environ
17 if 'PATH' in env:
18 env['PATH'] += os.pathsep + bindir
19 else:
20 env['PATH'] = bindir
21 out = ''
22 err = ''
23 proc = subprocess.Popen(
24 cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
25 while proc.returncode is None:
26 time.sleep(1)
27 stdout, stderr = proc.communicate()
28 out += stdout
29 err += stderr
30 proc.poll()
31 if proc.returncode == 0:
32 return 0
33 print(out)
34 print(err)
35 return proc.returncode
36
void print(void *str)
Definition bridge.cpp:126
Definition run.py:1

Variable Documentation

◆ DEPS

list run.DEPS
Initial value:
1= [
2 'env',
3 'recipe_engine/file',
4 'recipe_engine/path',
5 'recipe_engine/properties',
6 'recipe_engine/step',
7 'vars',
8]

Definition at line 7 of file __init__.py.

◆ PYTHON_VERSION_COMPATIBILITY

str run.PYTHON_VERSION_COMPATIBILITY = "PY3"

Definition at line 5 of file __init__.py.